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
63e65f8a
Commit
63e65f8a
authored
Nov 10, 2022
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改企业审核接口、修改新增项目接口
parent
dc65220b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
27 deletions
+30
-27
ProjectDto.java
.../com/yeejoin/amos/boot/module/ugp/api/dto/ProjectDto.java
+1
-0
CompanyMapper.java
...eejoin/amos/boot/module/ugp/api/mapper/CompanyMapper.java
+2
-1
ICompanyService.java
...oin/amos/boot/module/ugp/api/service/ICompanyService.java
+2
-1
CompanyMapper.xml
...odule-ugp-api/src/main/resources/mapper/CompanyMapper.xml
+4
-4
CompanyController.java
...mos/boot/module/ugp/biz/controller/CompanyController.java
+3
-4
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+13
-1
CompanyServiceImpl.java
.../boot/module/ugp/biz/service/impl/CompanyServiceImpl.java
+5
-16
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/ProjectDto.java
View file @
63e65f8a
...
...
@@ -106,4 +106,5 @@ public class ProjectDto extends BaseDto {
private
String
insDep
;
private
String
insPerson
;
private
String
startDateString
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/CompanyMapper.java
View file @
63e65f8a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
...
...
@@ -17,5 +18,5 @@ import java.util.List;
*/
@Mapper
public
interface
CompanyMapper
extends
BaseMapper
<
Company
>
{
List
<
CompanyDto
>
queryCompanyPage
(
Company
companyParam
);
IPage
<
CompanyDto
>
queryCompanyPage
(
IPage
<
CompanyDto
>
page
,
Company
companyParam
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/service/ICompanyService.java
View file @
63e65f8a
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.ugp.api.service;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
...
...
@@ -14,7 +15,7 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.Company;
*/
public
interface
ICompanyService
{
Page
<
CompanyDto
>
queryCompanyPage
(
int
current
,
int
size
,
Company
company
);
IPage
<
CompanyDto
>
queryCompanyPage
(
int
current
,
int
size
,
Company
company
);
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/CompanyMapper.xml
View file @
63e65f8a
...
...
@@ -6,11 +6,11 @@
<select
id=
"queryCompanyPage"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.entity.Company"
>
select * from tz_ugp_company
<where>
<if
test=
"
name != '' and
name != null"
>
and `name` like concat('%',#{name},'%')
<if
test=
"
companyParam.name != '' and companyParam.
name != null"
>
and `name` like concat('%',#{
companyParam.
name},'%')
</if>
<if
test=
"
type != '' and
type != null"
>
and `type` like concat('%',#{type},'%')
<if
test=
"
companyParam.type != '' and companyParam.
type != null"
>
and `type` like concat('%',#{
companyParam.
type},'%')
</if>
</where>
</select>
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/CompanyController.java
View file @
63e65f8a
...
...
@@ -164,11 +164,10 @@ public class CompanyController extends BaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@
Ge
tMapping
(
value
=
"/page"
)
@
Pos
tMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"企业信息表分页查询"
,
notes
=
"企业信息表分页查询"
)
public
ResponseModel
<
Page
<
CompanyDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
Company
company
)
{
public
ResponseModel
<
IPage
<
CompanyDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestBody
Company
company
)
{
return
ResponseHelper
.
buildResponse
(
companyServiceImpl
.
queryCompanyPage
(
current
,
size
,
company
));
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
63e65f8a
...
...
@@ -28,6 +28,7 @@ import io.swagger.annotations.Api;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
...
...
@@ -77,7 +78,11 @@ public class ProjectController extends BaseController {
public
ResponseModel
<
ProjectDto
>
save
(
@RequestBody
ProjectDto
model
)
{
String
regionName
=
""
,
regionCode
=
""
;
Map
<
String
,
String
>
map
=
getInfo
(
regionName
,
regionCode
,
Long
.
valueOf
(
model
.
getInstallRegionCode
()));
model
.
setStartDate
(
new
Date
());
try
{
model
.
setStartDate
(
new
SimpleDateFormat
(
"yyy-MM-dd HH:mm:ss"
).
parse
(
model
.
getStartDateString
()));
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
model
.
setSubmitDate
(
new
Date
());
model
.
setInstallationUnit
(
orgServiceImpl
.
getOrgUsrById
(
String
.
valueOf
(
model
.
getInstallationUnitId
())).
getBizOrgName
());
model
.
setDesignUnit
(
orgServiceImpl
.
getOrgUsrById
(
String
.
valueOf
(
model
.
getDesignUnitId
())).
getBizOrgName
());
...
...
@@ -134,6 +139,11 @@ public class ProjectController extends BaseController {
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新项目信息表"
,
notes
=
"根据sequenceNbr更新项目信息表"
)
public
ResponseModel
<
ProjectDto
>
updateBySequenceNbrProject
(
@RequestBody
ProjectDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
try
{
model
.
setStartDate
(
new
SimpleDateFormat
(
"yyy-MM-dd HH:mm:ss"
).
parse
(
model
.
getStartDateString
()));
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
model
.
setRecDate
(
new
Date
());
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
projectServiceImpl
.
updateWithModel
(
model
));
...
...
@@ -162,6 +172,8 @@ public class ProjectController extends BaseController {
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个项目信息表"
,
notes
=
"根据sequenceNbr查询单个项目信息表"
)
public
ResponseModel
<
ProjectDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
ProjectDto
projectDto
=
projectServiceImpl
.
queryBySeq
(
sequenceNbr
);
projectDto
.
setStartDateString
(
new
SimpleDateFormat
(
"yyy-MM-dd HH:mm:ss"
).
format
(
projectDto
.
getStartDate
()));
return
ResponseHelper
.
buildResponse
(
projectServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/CompanyServiceImpl.java
View file @
63e65f8a
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
...
...
@@ -62,24 +63,12 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
/**
* 分页查询+筛选
*/
public
Page
<
CompanyDto
>
queryCompanyPage
(
int
current
,
int
size
,
Company
company
)
{
Page
<
CompanyDto
>
page
=
new
Page
<>();
@Override
public
IPage
<
CompanyDto
>
queryCompanyPage
(
int
current
,
int
size
,
Company
company
)
{
IPage
<
CompanyDto
>
page
=
new
Page
<>();
page
.
setSize
(
size
);
page
.
setCurrent
(
current
);
this
.
list
();
List
<
CompanyDto
>
companies
=
companyMapper
.
queryCompanyPage
(
company
);
// List<CompanyDto> companyDtos = new ArrayList<>();
// BeanUtils.copyProperties(companies,companyDtos);
page
.
setRecords
(
companies
);
// if (companyDto.getName() != null) {
// List<CompanyDto> collect = page1.getRecords().stream().filter(a -> a.getName().equals(companyDto.getName())).collect(Collectors.toList());
// page1.setRecords(collect);
// }
return
page
;
return
companyMapper
.
queryCompanyPage
(
page
,
company
);
}
/**
...
...
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