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
8907ebd3
Commit
8907ebd3
authored
Jul 10, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
勘察提交
parent
b42529bc
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
134 additions
and
8 deletions
+134
-8
SurveyInfoAllDto.java
...ejoin/amos/boot/module/hygf/api/dto/SurveyInfoAllDto.java
+26
-0
SurveyInformationDto.java
...n/amos/boot/module/hygf/api/dto/SurveyInformationDto.java
+1
-2
Commercial.java
.../yeejoin/amos/boot/module/hygf/api/entity/Commercial.java
+6
-0
SurveyDetails.java
...ejoin/amos/boot/module/hygf/api/entity/SurveyDetails.java
+6
-0
SurveyInformation.java
...n/amos/boot/module/hygf/api/entity/SurveyInformation.java
+2
-4
BeanDtoUtils.java
.../yeejoin/amos/boot/module/hygf/api/util/BeanDtoUtils.java
+37
-0
SurveyInformationController.java
...dule/hygf/biz/controller/SurveyInformationController.java
+14
-0
SurveyInformationServiceImpl.java
...e/hygf/biz/service/impl/SurveyInformationServiceImpl.java
+42
-2
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/SurveyInfoAllDto.java
0 → 100644
View file @
8907ebd3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"SurveyInfoAllDto"
,
description
=
"勘察信息提交"
)
public
class
SurveyInfoAllDto
{
// 资料归档
InformationDto
information
;
// 勘察信息详情
SurveyDetailsDto
surveyDetails
;
// 勘察信息
SurveyInformationDto
surveyInformation
;
// 扩展信息
ExtendedInformationDto
extendedInformation
;
// 商务信息
CommercialDto
commercial
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/SurveyInformationDto.java
View file @
8907ebd3
...
@@ -34,8 +34,7 @@ public class SurveyInformationDto extends BaseDto {
...
@@ -34,8 +34,7 @@ public class SurveyInformationDto extends BaseDto {
private
String
developerCode
;
private
String
developerCode
;
@ApiModelProperty
(
value
=
" 业务员id"
)
@ApiModelProperty
(
value
=
" 业务员id"
)
private
String
salesman
private
String
salesmanId
;
Id
;
@ApiModelProperty
(
value
=
"业务员名称"
)
@ApiModelProperty
(
value
=
"业务员名称"
)
private
String
salesman
;
private
String
salesman
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/Commercial.java
View file @
8907ebd3
...
@@ -23,6 +23,12 @@ public class Commercial extends BaseEntity {
...
@@ -23,6 +23,12 @@ public class Commercial extends BaseEntity {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
/**
* 勘察表id
*/
@TableField
(
"survey_information_id"
)
private
Long
surveyInformationId
;
/**
* 商务类型
* 商务类型
*/
*/
@TableField
(
"type"
)
@TableField
(
"type"
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/SurveyDetails.java
View file @
8907ebd3
...
@@ -23,6 +23,12 @@ public class SurveyDetails extends BaseEntity {
...
@@ -23,6 +23,12 @@ public class SurveyDetails extends BaseEntity {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
/**
* 勘察表id
*/
@TableField
(
"survey_information_id"
)
private
Long
surveyInformationId
;
/**
* 勘察时间
* 勘察时间
*/
*/
@TableField
(
"surveyor_time"
)
@TableField
(
"surveyor_time"
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/SurveyInformation.java
View file @
8907ebd3
...
@@ -49,10 +49,8 @@ public class SurveyInformation extends BaseEntity {
...
@@ -49,10 +49,8 @@ public class SurveyInformation extends BaseEntity {
/**
/**
* 业务员id
* 业务员id
*/
*/
@TableField
(
"salesman
@TableField
(
"salesman _id"
)
_id"
)
private
String
salesmanId
;
private
String
salesman
Id
;
/**
/**
* 业务员名称
* 业务员名称
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/util/BeanDtoUtils.java
0 → 100644
View file @
8907ebd3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
util
;
import
org.springframework.beans.BeanUtils
;
public
class
BeanDtoUtils
{
/**
* Dot ,Vo ,Entity 相互转换
*
* @param source 原数据
* @param targetClass 目标类
* @param <T> 泛型类
* @return 转换返回值
*/
public
static
<
T
>
T
convert
(
Object
source
,
Class
<
T
>
targetClass
)
{
// 判断source是否为空
if
(
source
==
null
)
{
return
null
;
}
// 判断targetClass是否为空
if
(
targetClass
==
null
)
{
return
null
;
}
try
{
// 创建新的对象实例
T
target
=
targetClass
.
newInstance
();
// 把原对象数据拷贝到新对象
BeanUtils
.
copyProperties
(
source
,
target
);
// 返回新对象
return
target
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
null
;
}
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/SurveyInformationController.java
View file @
8907ebd3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.SurveyInfoAllDto
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -113,4 +114,17 @@ public class SurveyInformationController extends BaseController {
...
@@ -113,4 +114,17 @@ public class SurveyInformationController extends BaseController {
public
ResponseModel
<
List
<
SurveyInformationDto
>>
selectForList
()
{
public
ResponseModel
<
List
<
SurveyInformationDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
surveyInformationServiceImpl
.
queryForSurveyInformationList
());
return
ResponseHelper
.
buildResponse
(
surveyInformationServiceImpl
.
queryForSurveyInformationList
());
}
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"勘察信息数据提交"
,
notes
=
"勘察信息列表全部数据查询"
)
@PostMapping
(
value
=
"/survey"
)
public
ResponseModel
<
SurveyInfoAllDto
>
survey
(
@RequestBody
SurveyInfoAllDto
surveyInfoAllDto
)
{
SurveyInfoAllDto
returnDto
=
surveyInformationServiceImpl
.
saveSurveyInfo
(
surveyInfoAllDto
);
return
ResponseHelper
.
buildResponse
(
returnDto
);
}
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/SurveyInformationServiceImpl.java
View file @
8907ebd3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.SurveyInformation
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.*
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.SurveyInformationMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.SurveyInformationMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.ISurveyInformationService
;
import
com.yeejoin.amos.boot.module.hygf.api.service.ISurveyInformationService
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.SurveyInformationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.util.BeanDtoUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -17,6 +19,22 @@ import java.util.List;
...
@@ -17,6 +19,22 @@ import java.util.List;
*/
*/
@Service
@Service
public
class
SurveyInformationServiceImpl
extends
BaseService
<
SurveyInformationDto
,
SurveyInformation
,
SurveyInformationMapper
>
implements
ISurveyInformationService
{
public
class
SurveyInformationServiceImpl
extends
BaseService
<
SurveyInformationDto
,
SurveyInformation
,
SurveyInformationMapper
>
implements
ISurveyInformationService
{
@Autowired
SurveyDetailsServiceImpl
surveyDetailsService
;
@Autowired
InformationServiceImpl
informationService
;
@Autowired
ExtendedInformationServiceImpl
extendedInformationService
;
@Autowired
CommercialServiceImpl
commercialService
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -30,4 +48,25 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
...
@@ -30,4 +48,25 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
public
List
<
SurveyInformationDto
>
queryForSurveyInformationList
()
{
public
List
<
SurveyInformationDto
>
queryForSurveyInformationList
()
{
return
this
.
queryForList
(
""
,
false
);
return
this
.
queryForList
(
""
,
false
);
}
}
public
SurveyInfoAllDto
saveSurveyInfo
(
SurveyInfoAllDto
surveyInfoAllDto
)
{
SurveyInformation
surveyInformation
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getSurveyInformation
(),
SurveyInformation
.
class
);
this
.
save
(
surveyInformation
);
SurveyDetails
surveyDetails
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getSurveyDetails
(),
SurveyDetails
.
class
);
surveyDetailsService
.
save
(
surveyDetails
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
()));
Information
information
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getInformation
(),
Information
.
class
);
informationService
.
save
(
information
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
()));
Commercial
commercial
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getCommercial
(),
Commercial
.
class
);
commercialService
.
save
(
commercial
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
()));
ExtendedInformation
extendedInformation
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getExtendedInformation
(),
ExtendedInformation
.
class
);
extendedInformationService
.
save
(
extendedInformation
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
()));
return
surveyInfoAllDto
;
}
}
}
\ No newline at end of file
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