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
06089ffb
Commit
06089ffb
authored
Nov 12, 2024
by
chang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车辆+设备详情查询
parent
0d60ea8e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
173 additions
and
0 deletions
+173
-0
CarAndEquVo.java
...a/com/yeejoin/amos/boot/module/jg/api/vo/CarAndEquVo.java
+17
-0
ShCarEquVo.java
...va/com/yeejoin/amos/boot/module/jg/api/vo/ShCarEquVo.java
+117
-0
ShCarController.java
...n/amos/boot/module/jg/biz/controller/ShCarController.java
+1
-0
ShCarEquController.java
...mos/boot/module/jg/biz/controller/ShCarEquController.java
+9
-0
ShCarEquServiceImpl.java
.../boot/module/jg/biz/service/impl/ShCarEquServiceImpl.java
+29
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/vo/CarAndEquVo.java
0 → 100644
View file @
06089ffb
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
vo
;
import
com.yeejoin.amos.boot.module.jg.api.entity.ShCar
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author chang xiangyu 2024/11/12
*/
@Data
@AllArgsConstructor
public
class
CarAndEquVo
{
private
ShCar
shCar
;
private
List
<
ShCarEquVo
>
shCarEquVoList
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/vo/ShCarEquVo.java
0 → 100644
View file @
06089ffb
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yeejoin.amos.boot.module.jg.api.entity.ShCarEqu
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @author chang xiangyu 2024/11/12
*/
@Data
public
class
ShCarEquVo
{
/**
* primary key
*/
private
String
sequenceNbr
;
/**
* tzs_sh_car表主键
*/
private
String
carId
;
/**
* 设备编号sequenceCode
*/
private
String
sequenceCode
;
/**
* 设备代码
*/
private
String
equCode
;
/**
* 制造日期
*/
private
Date
produceDate
;
/**
* 安装日期
*/
private
Date
equInstalldate
;
/**
* 检查日期
*/
private
Date
equCheckdate
;
/**
* firstDate
*/
private
Date
equFirstdate
;
/**
* 序号
*/
private
String
serialNumber
;
/**
* sub_DM 代码
*/
private
String
equDm
;
/**
* 单位编号 equDwbh
*/
private
String
UseInnerCode
;
/**
* 公称工作压力(MPa) equQpgc
*/
private
String
nominalWorkingPressure
;
/**
* 气瓶批号
*/
private
String
batchNumber
;
/**
* PFZZDW PF制造单位
*/
private
String
equPfzzdw
;
/**
* isChange
*/
private
Integer
ischange
;
/**
* 报告编号
*/
private
String
reportcode
;
/**
* BFReportCode
*/
private
String
bfreportcode
;
/**
* 操作方式
*/
private
String
equCzfs
;
/**
* 是否认领
*/
private
String
claimedFlag
;
public
ShCarEquVo
(
ShCarEqu
shCarEqu
)
{
this
.
setSequenceNbr
(
shCarEqu
.
getSequenceNbr
());
this
.
setCarId
(
shCarEqu
.
getCarId
());
this
.
setEquCode
(
shCarEqu
.
getEquCode
());
this
.
setUseInnerCode
(
shCarEqu
.
getEquDwbh
());
this
.
setNominalWorkingPressure
(
shCarEqu
.
getEquQpgc
());
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/ShCarController.java
View file @
06089ffb
...
...
@@ -61,6 +61,7 @@ public class ShCarController extends BaseController {
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
ShCar
>
updateBySequenceNbrShCar
(
@RequestBody
ShCar
entity
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
// entity.setSequenceNbr(sequenceNbr);
entity
.
setSequenceNbr
(
String
.
valueOf
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
shCarServiceImpl
.
updateWithModel
(
entity
));
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/ShCarEquController.java
View file @
06089ffb
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.entity.ShCarEqu
;
import
com.yeejoin.amos.boot.module.jg.api.vo.CarAndEquVo
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
...
...
@@ -55,6 +56,7 @@ public class ShCarEquController extends BaseController {
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
ShCarEqu
>
updateBySequenceNbrShCarEqu
(
@RequestBody
ShCarEqu
entity
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
// entity.setSequenceNbr(sequenceNbr);
entity
.
setSequenceNbr
(
String
.
valueOf
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
shCarEquServiceImpl
.
updateWithModel
(
entity
));
}
...
...
@@ -113,4 +115,11 @@ public class ShCarEquController extends BaseController {
public
ResponseModel
<
List
<
ShCarEqu
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
shCarEquServiceImpl
.
queryForShCarEquList
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"汽车详细信息列表"
,
notes
=
"汽车详细信息列表"
)
@GetMapping
(
value
=
"/selectByCarId"
)
public
ResponseModel
<
CarAndEquVo
>
selectByCarId
(
@RequestParam
String
carId
)
{
return
ResponseHelper
.
buildResponse
(
shCarEquServiceImpl
.
queryByCarId
(
carId
));
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/ShCarEquServiceImpl.java
View file @
06089ffb
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.ShCar
;
import
com.yeejoin.amos.boot.module.jg.api.entity.ShCarEqu
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.ShCarEquMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IShCarEquService
;
import
com.yeejoin.amos.boot.module.jg.api.vo.CarAndEquVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.ShCarEquVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* 服务实现类
...
...
@@ -16,6 +22,9 @@ import java.util.List;
*/
@Service
public
class
ShCarEquServiceImpl
extends
BaseService
<
ShCarEqu
,
ShCarEqu
,
ShCarEquMapper
>
implements
IShCarEquService
{
@Autowired
ShCarServiceImpl
shCarServiceImpl
;
/**
* 分页查询
*/
...
...
@@ -29,4 +38,23 @@ public class ShCarEquServiceImpl extends BaseService<ShCarEqu,ShCarEqu,ShCarEquM
public
List
<
ShCarEqu
>
queryForShCarEquList
()
{
return
this
.
queryForList
(
""
,
false
);
}
public
CarAndEquVo
queryByCarId
(
String
carId
){
//根据carId获取Car
LambdaQueryWrapper
<
ShCar
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
queryWrapper1
.
eq
(
ShCar:
:
getSequenceNbr
,
carId
);
ShCar
shCar
=
shCarServiceImpl
.
getOne
(
queryWrapper1
);
//根据carId获取设备列表
LambdaQueryWrapper
<
ShCarEqu
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
ShCarEqu:
:
getCarId
,
carId
);
List
<
ShCarEqu
>
list
=
this
.
list
(
queryWrapper
);
//将设备列表转换为前端可识别bean
List
<
ShCarEquVo
>
collect
=
list
.
stream
().
map
(
shCarEqu
->
new
ShCarEquVo
(
shCarEqu
)).
collect
(
Collectors
.
toList
());
//封装返回VO
CarAndEquVo
carAndEquVo
=
new
CarAndEquVo
(
shCar
,
collect
);
return
carAndEquVo
;
}
}
\ 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