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
6c58a717
Commit
6c58a717
authored
Nov 09, 2022
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改新增项目接口,新增添加项目code
parent
54ca8e90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+15
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
6c58a717
...
@@ -28,6 +28,7 @@ import io.swagger.annotations.Api;
...
@@ -28,6 +28,7 @@ import io.swagger.annotations.Api;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
@@ -84,6 +85,7 @@ public class ProjectController extends BaseController {
...
@@ -84,6 +85,7 @@ public class ProjectController extends BaseController {
model
.
setChargePerson
(
orgServiceImpl
.
getOrgUsrById
(
String
.
valueOf
(
model
.
getChargePersonId
())).
getBizOrgName
());
model
.
setChargePerson
(
orgServiceImpl
.
getOrgUsrById
(
String
.
valueOf
(
model
.
getChargePersonId
())).
getBizOrgName
());
model
.
setInstallRegion
(
map
.
get
(
"regionName"
));
model
.
setInstallRegion
(
map
.
get
(
"regionName"
));
model
.
setInstallRegionCode
(
map
.
get
(
"regionCode"
));
model
.
setInstallRegionCode
(
map
.
get
(
"regionCode"
));
model
.
setCode
(
getCode
());
model
=
projectServiceImpl
.
createWithModel
(
model
);
model
=
projectServiceImpl
.
createWithModel
(
model
);
Project
project
=
new
Project
();
Project
project
=
new
Project
();
BeanUtils
.
copyProperties
(
model
,
project
);
BeanUtils
.
copyProperties
(
model
,
project
);
...
@@ -91,6 +93,19 @@ public class ProjectController extends BaseController {
...
@@ -91,6 +93,19 @@ public class ProjectController extends BaseController {
return
ResponseHelper
.
buildResponse
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
}
public
String
getCode
(){
String
date
=
new
SimpleDateFormat
(
"MMdd"
).
format
(
new
Date
());
String
code
=
"XM"
+
date
+
"-"
;
int
c
=
1
;
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
orderByDesc
(
Project:
:
getCode
);
String
projectCode
=
projectServiceImpl
.
list
(
wrapper
).
iterator
().
next
().
getCode
();
if
(!
ValidationUtil
.
isEmpty
(
projectCode
)){
c
=
Integer
.
parseInt
(
projectCode
.
substring
(
projectCode
.
indexOf
(
"-"
)+
1
,
projectCode
.
length
()))+
1
;
}
return
code
+
c
;
}
public
Map
<
String
,
String
>
getInfo
(
String
regionName
,
String
regionCode
,
Long
sequenceNbr
){
public
Map
<
String
,
String
>
getInfo
(
String
regionName
,
String
regionCode
,
Long
sequenceNbr
){
RegionModel
region
=
Systemctl
.
regionClient
.
getRegion
(
sequenceNbr
).
getResult
();
RegionModel
region
=
Systemctl
.
regionClient
.
getRegion
(
sequenceNbr
).
getResult
();
regionName
=
region
.
getRegionName
()
+
regionName
;
regionName
=
region
.
getRegionName
()
+
regionName
;
...
...
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