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
45f2d50c
Commit
45f2d50c
authored
Nov 12, 2024
by
hekaiwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加车辆信息表分页查询接口
parent
72f2c4dc
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
80 additions
and
23 deletions
+80
-23
ShCarDto.java
...ava/com/yeejoin/amos/boot/module/jg/api/dto/ShCarDto.java
+2
-3
ShCarEquDto.java
.../com/yeejoin/amos/boot/module/jg/api/dto/ShCarEquDto.java
+2
-3
ShCar.java
...ava/com/yeejoin/amos/boot/module/jg/api/entity/ShCar.java
+1
-1
ShCarEqu.java
.../com/yeejoin/amos/boot/module/jg/api/entity/ShCarEqu.java
+1
-1
ShCarMapper.java
...m/yeejoin/amos/boot/module/jg/api/mapper/ShCarMapper.java
+4
-0
IShCarService.java
...eejoin/amos/boot/module/jg/api/service/IShCarService.java
+7
-1
ShCarMapper.xml
...t-module-jg-api/src/main/resources/mapper/ShCarMapper.xml
+23
-0
ShCarController.java
...n/amos/boot/module/jg/biz/controller/ShCarController.java
+26
-13
ShCarEquController.java
...mos/boot/module/jg/biz/controller/ShCarEquController.java
+1
-1
ShCarServiceImpl.java
...mos/boot/module/jg/biz/service/impl/ShCarServiceImpl.java
+13
-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/dto/ShCarDto.java
View file @
45f2d50c
...
@@ -16,9 +16,8 @@ import java.util.Date;
...
@@ -16,9 +16,8 @@ import java.util.Date;
* @date 2024-11-08
* @date 2024-11-08
*/
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"ShCarDto"
,
description
=
"三环系统-车辆信息表"
)
@ApiModel
(
value
=
"ShCarDto"
,
description
=
"三环系统-车辆信息表"
)
public
class
ShCarDto
extends
BaseDto
{
public
class
ShCarDto
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -139,7 +138,7 @@ public class ShCarDto extends BaseDto {
...
@@ -139,7 +138,7 @@ public class ShCarDto extends BaseDto {
@TableField
(
"PREVIOUS_INSPECTION_REPORT_NUMBER"
)
@TableField
(
"PREVIOUS_INSPECTION_REPORT_NUMBER"
)
private
String
previousInspectionReportNumber
;
private
String
previousInspectionReportNumber
;
@ApiModelProperty
(
value
=
"是否认领"
)
@ApiModelProperty
(
value
=
"是否认领
1已认领 0未认领
"
)
@TableField
(
"CLAIMED_FLAG"
)
@TableField
(
"CLAIMED_FLAG"
)
private
String
claimedFlag
;
private
String
claimedFlag
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/ShCarEquDto.java
View file @
45f2d50c
...
@@ -16,9 +16,8 @@ import java.util.Date;
...
@@ -16,9 +16,8 @@ import java.util.Date;
* @date 2024-11-08
* @date 2024-11-08
*/
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"ShCarEquDto"
,
description
=
""
)
@ApiModel
(
value
=
"ShCarEquDto"
,
description
=
""
)
public
class
ShCarEquDto
extends
BaseDto
{
public
class
ShCarEquDto
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -95,7 +94,7 @@ public class ShCarEquDto extends BaseDto {
...
@@ -95,7 +94,7 @@ public class ShCarEquDto extends BaseDto {
@TableField
(
"EQU_CZFS"
)
@TableField
(
"EQU_CZFS"
)
private
String
equCzfs
;
private
String
equCzfs
;
@ApiModelProperty
(
value
=
"是否认领"
)
@ApiModelProperty
(
value
=
"是否认领
1已认领 0未认领
"
)
@TableField
(
"CLAIMED_FLAG"
)
@TableField
(
"CLAIMED_FLAG"
)
private
String
claimedFlag
;
private
String
claimedFlag
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/ShCar.java
View file @
45f2d50c
...
@@ -202,7 +202,7 @@ public class ShCar {
...
@@ -202,7 +202,7 @@ public class ShCar {
private
String
previousInspectionReportNumber
;
private
String
previousInspectionReportNumber
;
/**
/**
* 是否认领
* 是否认领
1已认领 0未认领
*/
*/
@TableField
(
value
=
"\"CLAIMED_FLAG\""
)
@TableField
(
value
=
"\"CLAIMED_FLAG\""
)
private
String
claimedFlag
;
private
String
claimedFlag
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/ShCarEqu.java
View file @
45f2d50c
...
@@ -131,7 +131,7 @@ public class ShCarEqu {
...
@@ -131,7 +131,7 @@ public class ShCarEqu {
private
String
equCzfs
;
private
String
equCzfs
;
/**
/**
* 是否认领
* 是否认领
1已认领 0未认领
*/
*/
@TableField
(
value
=
"\"CLAIMED_FLAG\""
)
@TableField
(
value
=
"\"CLAIMED_FLAG\""
)
private
String
claimedFlag
;
private
String
claimedFlag
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/ShCarMapper.java
View file @
45f2d50c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ShCarDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.ShCar
;
import
com.yeejoin.amos.boot.module.jg.api.entity.ShCar
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
@@ -11,4 +13,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -11,4 +13,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
*/
public
interface
ShCarMapper
extends
BaseMapper
<
ShCar
>
{
public
interface
ShCarMapper
extends
BaseMapper
<
ShCar
>
{
Page
<
ShCarDto
>
queryForshCarPage
(
Page
<
ShCarDto
>
page
,
ShCarDto
dto
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IShCarService.java
View file @
45f2d50c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ShCarDto
;
/**
/**
* 三环系统-车辆信息表接口类
* 三环系统-车辆信息表接口类
*
*
* @author system_generator
* @author system_generator
* @date 2024-11-08
* @date 2024-11-08
*/
*/
public
interface
IShCarService
{}
public
interface
IShCarService
{
Page
<
ShCarDto
>
queryForShCarPage
(
Page
<
ShCarDto
>
page
,
ShCarDto
dto
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/ShCarMapper.xml
View file @
45f2d50c
...
@@ -2,4 +2,27 @@
...
@@ -2,4 +2,27 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jg.api.mapper.ShCarMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.jg.api.mapper.ShCarMapper"
>
<select
id=
"queryForshCarPage"
resultType=
"com.yeejoin.amos.boot.module.jg.api.dto.ShCarDto"
>
select
*
FROM tzs_sh_car tsc
<where>
<if
test=
"dto != null "
>
<if
test=
"dto.useRegistrationCode != null and dto.useRegistrationCode != ''"
>
AND tsc.USE_REGISTRATION_CODE LIKE CONCAT('%', #{dto.useRegistrationCode}, '%')
</if>
<if
test=
"dto.carNumber != null and dto.carNumber != ''"
>
AND tsc.CAR_NUMBER LIKE CONCAT('%', #{dto.carNumber}, '%')
</if>
<if
test=
"dto.frameNumber != null and dto.frameNumber != ''"
>
AND tsc.FRAME_NUMBER LIKE CONCAT('%', #{dto.frameNumber}, '%')
</if>
<if
test=
"dto.claimedFlag != null and dto.claimedFlag != ''"
>
AND tsc.CLAIMED_FLAG = #{dto.claimedFlag}
</if>
</if>
</where>
ORDER BY
tsc.USE_REGISTRATION_CODE DESC
</select>
</mapper>
</mapper>
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 @
45f2d50c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ShCarDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.ShCar
;
import
com.yeejoin.amos.boot.module.jg.api.entity.ShCar
;
import
com.yeejoin.amos.boot.module.jg.api.service.IShCarService
;
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
;
...
@@ -32,6 +34,8 @@ public class ShCarController extends BaseController {
...
@@ -32,6 +34,8 @@ public class ShCarController extends BaseController {
@Autowired
@Autowired
ShCarServiceImpl
shCarServiceImpl
;
ShCarServiceImpl
shCarServiceImpl
;
@Autowired
IShCarService
iShCarService
;
/**
/**
* 新增
* 新增
*
*
...
@@ -54,7 +58,7 @@ public class ShCarController extends BaseController {
...
@@ -54,7 +58,7 @@ public class ShCarController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
ShCar
>
updateBySequenceNbrShCar
(
@RequestBody
ShCar
entity
,
@PathVariable
(
value
=
"sequenceNbr"
)
Lo
ng
sequenceNbr
)
{
public
ResponseModel
<
ShCar
>
updateBySequenceNbrShCar
(
@RequestBody
ShCar
entity
,
@PathVariable
(
value
=
"sequenceNbr"
)
Stri
ng
sequenceNbr
)
{
entity
.
setSequenceNbr
(
sequenceNbr
);
entity
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
shCarServiceImpl
.
updateWithModel
(
entity
));
return
ResponseHelper
.
buildResponse
(
shCarServiceImpl
.
updateWithModel
(
entity
));
}
}
...
@@ -86,21 +90,30 @@ public class ShCarController extends BaseController {
...
@@ -86,21 +90,30 @@ public class ShCarController extends BaseController {
}
}
/**
/**
* 列表分页查询
* 列表分页查询
*
*
* @param current 当前页
* @param current 当前页
* @param current
每页大小
* @param size
每页大小
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
ResponseModel
<
Page
<
ShCar
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
public
ResponseModel
<
Page
<
ShCarDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
(
value
=
"size"
)
int
size
)
{
@RequestParam
(
value
=
"size"
)
int
size
,
Page
<
ShCar
>
page
=
new
Page
<
ShCar
>();
ShCarDto
dto
)
{
page
.
setCurrent
(
current
);
Page
<
ShCarDto
>
page
=
new
Page
<>();
page
.
setSize
(
size
);
page
.
setCurrent
(
current
);
return
ResponseHelper
.
buildResponse
(
shCarServiceImpl
.
queryForShCarPage
(
page
));
page
.
setSize
(
size
);
Page
<
ShCarDto
>
shCarDtoPage
=
iShCarService
.
queryForShCarPage
(
page
,
dto
);
shCarDtoPage
.
getRecords
().
forEach
(
record
->
{
if
(
"1"
.
equals
(
record
.
getClaimedFlag
()))
{
record
.
setClaimedFlag
(
"是"
);
}
else
if
(
"0"
.
equals
(
record
.
getClaimedFlag
()))
{
record
.
setClaimedFlag
(
"否"
);
}
});
return
ResponseHelper
.
buildResponse
(
shCarDtoPage
);
}
}
/**
/**
...
...
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 @
45f2d50c
...
@@ -53,7 +53,7 @@ public class ShCarEquController extends BaseController {
...
@@ -53,7 +53,7 @@ public class ShCarEquController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
ShCarEqu
>
updateBySequenceNbrShCarEqu
(
@RequestBody
ShCarEqu
entity
,
@PathVariable
(
value
=
"sequenceNbr"
)
Lo
ng
sequenceNbr
)
{
public
ResponseModel
<
ShCarEqu
>
updateBySequenceNbrShCarEqu
(
@RequestBody
ShCarEqu
entity
,
@PathVariable
(
value
=
"sequenceNbr"
)
Stri
ng
sequenceNbr
)
{
entity
.
setSequenceNbr
(
sequenceNbr
);
entity
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
shCarEquServiceImpl
.
updateWithModel
(
entity
));
return
ResponseHelper
.
buildResponse
(
shCarEquServiceImpl
.
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/service/impl/ShCarServiceImpl.java
View file @
45f2d50c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ShCarDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.ShCar
;
import
com.yeejoin.amos.boot.module.jg.api.entity.ShCar
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.ShCarMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.ShCarMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IShCarService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IShCarService
;
...
@@ -16,6 +17,12 @@ import java.util.List;
...
@@ -16,6 +17,12 @@ import java.util.List;
*/
*/
@Service
@Service
public
class
ShCarServiceImpl
extends
BaseService
<
ShCar
,
ShCar
,
ShCarMapper
>
implements
IShCarService
{
public
class
ShCarServiceImpl
extends
BaseService
<
ShCar
,
ShCar
,
ShCarMapper
>
implements
IShCarService
{
private
final
ShCarMapper
shCarMapper
;
public
ShCarServiceImpl
(
ShCarMapper
shCarMapper
)
{
this
.
shCarMapper
=
shCarMapper
;
}
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -29,4 +36,9 @@ public class ShCarServiceImpl extends BaseService<ShCar,ShCar,ShCarMapper> imple
...
@@ -29,4 +36,9 @@ public class ShCarServiceImpl extends BaseService<ShCar,ShCar,ShCarMapper> imple
public
List
<
ShCar
>
queryForShCarList
()
{
public
List
<
ShCar
>
queryForShCarList
()
{
return
this
.
queryForList
(
""
,
false
);
return
this
.
queryForList
(
""
,
false
);
}
}
@Override
public
Page
<
ShCarDto
>
queryForShCarPage
(
Page
<
ShCarDto
>
page
,
ShCarDto
dto
)
{
return
shCarMapper
.
queryForshCarPage
(
page
,
dto
);
}
}
}
\ 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