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
6afdeaa8
Commit
6afdeaa8
authored
Sep 03, 2021
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'chenhao' of
http://172.16.10.76/moa/amos-boot-biz
into chenhao
parents
6fab1d04
c0c7fe10
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
8 deletions
+24
-8
DateUtils.java
...ava/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
+2
-2
FirefightersPostController.java
...ule/common/biz/controller/FirefightersPostController.java
+20
-5
FirefightersThoughtController.java
.../common/biz/controller/FirefightersThoughtController.java
+2
-1
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
View file @
6afdeaa8
...
...
@@ -155,7 +155,7 @@ public class DateUtils {
* @throws ParseException
*/
public
static
String
dateFormat
(
Date
date
,
String
pattern
)
throws
ParseException
{
if
(
StringUtils
.
is
Not
Empty
(
pattern
))
{
if
(
StringUtils
.
isEmpty
(
pattern
))
{
pattern
=
DateUtils
.
DATE_PATTERN
;
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
pattern
);
...
...
@@ -203,7 +203,7 @@ public class DateUtils {
* @throws ParseException
*/
public
static
Date
dateParse
(
String
dateTimeString
,
String
pattern
)
throws
ParseException
{
if
(
StringUtils
.
is
Not
Empty
(
pattern
))
{
if
(
StringUtils
.
isEmpty
(
pattern
))
{
pattern
=
DateUtils
.
DATE_PATTERN
;
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
pattern
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/FirefightersPostController.java
View file @
6afdeaa8
...
...
@@ -66,6 +66,7 @@ public class FirefightersPostController extends BaseController {
*
* @return
*/
@SuppressWarnings
(
"unchecked"
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增岗位信息"
,
notes
=
"新增岗位信息"
)
...
...
@@ -73,8 +74,11 @@ public class FirefightersPostController extends BaseController {
public
ResponseModel
<
Object
>
saveFirefightersPost
(
@RequestBody
FirefightersDataDto
firefightersDataDto
)
{
try
{
/*---------修改bug:2179 解決崗位与学历可以重复添加导致的列表页展示消防人员信息呈现多条的情况 on 2021-08-21 陈浩---start*/
LambdaQueryWrapper
<
FirefightersPost
>
queryWrapper
=
new
LambdaQueryWrapper
<
FirefightersPost
>();
queryWrapper
.
eq
(
FirefightersPost:
:
getFirefightersId
,
firefightersDataDto
.
getFirefightersPost
().
getFirefightersId
());
//LambdaQueryWrapper<FirefightersPost> queryWrapper = new LambdaQueryWrapper<FirefightersPost>();
//.eq(FirefightersPost::getFirefightersId, firefightersDataDto.getFirefightersPost().getFirefightersId());
@SuppressWarnings
(
"rawtypes"
)
QueryWrapper
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"firefighters_id"
,
firefightersDataDto
.
getFirefightersPost
().
getFirefightersId
());
FirefightersPost
firefightersPost
=
iFirefightersPostService
.
getOne
(
queryWrapper
);
if
(
firefightersPost
==
null
)
{
...
...
@@ -82,10 +86,21 @@ public class FirefightersPostController extends BaseController {
}
else
{
iFirefightersPostService
.
update
(
firefightersDataDto
.
getFirefightersPost
(),
queryWrapper
);
}
// iFirefightersPostService.save(firefightersDataDto.getFirefightersPost());
FirefightersEducation
firefightersEducation
=
ifirefightersEducationService
.
getOne
(
queryWrapper
);
if
(
firefightersEducation
==
null
)
{
ifirefightersEducationService
.
save
(
firefightersDataDto
.
getFirefightersEducation
());
}
else
{
ifirefightersEducationService
.
update
(
firefightersDataDto
.
getFirefightersEducation
(),
queryWrapper
);
}
FirefightersWorkexperience
firefightersWorkexperience
=
ifirefightersWorkexperienceService
.
getOne
(
queryWrapper
);
if
(
firefightersWorkexperience
==
null
)
{
ifirefightersWorkexperienceService
.
save
(
firefightersDataDto
.
getFirefightersWorkexperience
());
}
else
{
ifirefightersWorkexperienceService
.
update
(
firefightersDataDto
.
getFirefightersWorkexperience
(),
queryWrapper
);
}
/*---------修改bug:2179 解決崗位与学历可以重复添加导致的列表页展示消防人员信息呈现多条的情况 on 2021-08-21 陈浩---end*/
ifirefightersWorkexperienceService
.
save
(
firefightersDataDto
.
getFirefightersWorkexperience
());
ifirefightersEducationService
.
save
(
firefightersDataDto
.
getFirefightersEducation
());
return
ResponseHelper
.
buildResponse
(
null
);
}
catch
(
Exception
e
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/FirefightersThoughtController.java
View file @
6afdeaa8
...
...
@@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
...
...
@@ -163,7 +164,7 @@ public class FirefightersThoughtController extends BaseController {
}
}
else
if
(
type
.
equals
(
Date
.
class
))
{
Date
fileValue
=
(
Date
)
field
.
get
(
firefightersThought
);
firefightersThoughtQueryWrapper
.
eq
(
name
,
fileValue
);
firefightersThoughtQueryWrapper
.
likeRight
(
name
,
DateUtils
.
dateFormat
(
fileValue
,
null
)
);
}
else
{
if
(!
name
.
equals
(
NameUtils
.
camel2Underline
(
"serialVersionUID"
)))
{
String
fileValue
=
(
String
)
field
.
get
(
firefightersThought
);
...
...
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