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
d06208d6
Commit
d06208d6
authored
Nov 03, 2022
by
wanglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加监理巡检
parent
934262dc
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
279 additions
and
0 deletions
+279
-0
InspectionDto.java
...m/yeejoin/amos/boot/module/ugp/api/dto/InspectionDto.java
+36
-0
Inspection.java
...m/yeejoin/amos/boot/module/ugp/api/entity/Inspection.java
+40
-0
InspectionMapper.java
...oin/amos/boot/module/ugp/api/mapper/InspectionMapper.java
+14
-0
InspectionService.java
...n/amos/boot/module/ugp/api/service/InspectionService.java
+14
-0
InspectionController.java
.../boot/module/ugp/biz/controller/InspectionController.java
+147
-0
InspectionServiceImpl.java
...ot/module/ugp/biz/service/impl/InspectionServiceImpl.java
+25
-0
ProjectResourceServiceImpl.java
...dule/ugp/biz/service/impl/ProjectResourceServiceImpl.java
+3
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/InspectionDto.java
0 → 100644
View file @
d06208d6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* Dto
*
* @author duanwei
* @date 2022-11-03
*/
@Data
public
class
InspectionDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 项目id
*/
private
Long
projectId
;
@ApiModelProperty
(
value
=
"焊口编码"
)
/**
* 焊口编码
*/
private
String
code
;
@ApiModelProperty
(
value
=
"图片地址"
)
/**
* 图片地址
*/
private
String
image
;
private
String
status
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/entity/Inspection.java
0 → 100644
View file @
d06208d6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* @author duanwei
* @date 2022-11-03
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"TzUgpInspection对象"
,
description
=
""
)
@TableName
(
"tz_ugp_inspection"
)
public
class
Inspection
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"项目id"
)
private
Long
projectId
;
@ApiModelProperty
(
value
=
"焊口编码"
)
private
String
code
;
@ApiModelProperty
(
value
=
"图片地址"
)
private
String
image
;
@ApiModelProperty
(
value
=
"检验状态"
)
private
String
status
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/InspectionMapper.java
0 → 100644
View file @
d06208d6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Inspection
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* Mapper 接口
*
* @author duanwei
* @date 2022-11-03
*/
public
interface
InspectionMapper
extends
BaseMapper
<
Inspection
>
{
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/service/InspectionService.java
0 → 100644
View file @
d06208d6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
service
;
/**
* 服务类
*
* @author duanwei
* @date 2022-11-03
*/
public
interface
InspectionService
{
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/InspectionController.java
0 → 100644
View file @
d06208d6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Inspection
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.InspectionServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Arrays
;
/**
* @author duanwei
* @date 2022-11-03
*/
@RestController
@Api
(
tags
=
"Api"
)
@RequestMapping
(
value
=
"/tz-ugp-inspection"
)
public
class
InspectionController
{
@Autowired
InspectionServiceImpl
iTzUgpInspectionServiceImpl
;
/**
* 新增
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
boolean
saveTzUgpInspection
(
HttpServletRequest
request
,
@RequestBody
Inspection
tzUgpInspection
)
{
return
iTzUgpInspectionServiceImpl
.
save
(
tzUgpInspection
);
}
/**
* 根据id删除
*
* @param id
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
public
boolean
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
return
iTzUgpInspectionServiceImpl
.
removeById
(
id
);
}
/**
* 修改
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改"
,
notes
=
"修改"
)
public
boolean
updateByIdTzUgpInspection
(
HttpServletRequest
request
,
@RequestBody
Inspection
tzUgpInspection
)
{
return
iTzUgpInspectionServiceImpl
.
updateById
(
tzUgpInspection
);
}
/**
* 根据id查询
*
* @param id
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
Inspection
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
return
iTzUgpInspectionServiceImpl
.
getById
(
id
);
}
/**
* 列表分页查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
public
IPage
<
Inspection
>
listPage
(
String
pageNum
,
String
pageSize
,
Inspection
tzUgpInspection
)
{
Page
<
Inspection
>
pageBean
;
QueryWrapper
<
Inspection
>
tzUgpInspectionQueryWrapper
=
new
QueryWrapper
<>();
Class
<?
extends
Inspection
>
aClass
=
tzUgpInspection
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
field
.
setAccessible
(
true
);
Object
o
=
field
.
get
(
tzUgpInspection
);
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
String
name
=
NameUtils
.
camel2Underline
(
field
.
getName
());
if
(
type
.
equals
(
Integer
.
class
))
{
Integer
fileValue
=
(
Integer
)
field
.
get
(
tzUgpInspection
);
tzUgpInspectionQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
Long
.
class
))
{
Long
fileValue
=
(
Long
)
field
.
get
(
tzUgpInspection
);
tzUgpInspectionQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
tzUgpInspection
);
tzUgpInspectionQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
String
fileValue
=
(
String
)
field
.
get
(
tzUgpInspection
);
tzUgpInspectionQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
catch
(
Exception
e
)
{
}
});
IPage
<
Inspection
>
page
;
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
}
else
{
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
}
page
=
iTzUgpInspectionServiceImpl
.
page
(
pageBean
,
tzUgpInspectionQueryWrapper
);
return
page
;
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
""
,
notes
=
""
)
@GetMapping
(
"/saveInfo"
)
public
ResponseModel
<
String
>
saveInfo
(
@RequestBody
JSONObject
jsonObject
)
{
return
ResponseHelper
.
buildResponse
(
iTzUgpInspectionServiceImpl
.
saveInfo
(
jsonObject
));
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/InspectionServiceImpl.java
0 → 100644
View file @
d06208d6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.IntelligentInspectionEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InspectionDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Inspection
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.InspectionMapper
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
@Service
public
class
InspectionServiceImpl
extends
BaseService
<
InspectionDto
,
Inspection
,
InspectionMapper
>
{
public
String
saveInfo
(
JSONObject
jsonObject
)
{
Inspection
inspection
=
new
Inspection
();
inspection
.
setProjectId
(
Long
.
valueOf
(
jsonObject
.
getString
(
"projectId"
)));
inspection
.
setCode
(
jsonObject
.
getString
(
"code"
));
inspection
.
setStatus
(
IntelligentInspectionEnum
.
getStatusByNameMap
.
get
(
jsonObject
.
getString
(
"status"
)));
inspection
.
setImage
(
jsonObject
.
getString
(
"image"
));
this
.
save
(
inspection
);
return
"ok"
;
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectResourceServiceImpl.java
View file @
d06208d6
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectMaterialDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectMaterialDto
;
...
@@ -197,10 +198,12 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
...
@@ -197,10 +198,12 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
* @param 资源
* @param 资源
* @return
* @return
*/
*/
private
final
String
是否删除
=
"0"
;
private
List
<
ProjectResource
>
getProjectResources
(
String
projectId
,
ProjectResourceEnum
资源
)
{
private
List
<
ProjectResource
>
getProjectResources
(
String
projectId
,
ProjectResourceEnum
资源
)
{
LambdaQueryWrapper
<
ProjectResource
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
ProjectResource
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
ProjectResource:
:
getProjectId
,
projectId
);
wrapper
.
eq
(
ProjectResource:
:
getProjectId
,
projectId
);
wrapper
.
eq
(
ProjectResource:
:
getType
,
资源
.
getCode
());
wrapper
.
eq
(
ProjectResource:
:
getType
,
资源
.
getCode
());
wrapper
.
eq
(
BaseEntity:
:
getIsDelete
,
是否删除
);
List
<
ProjectResource
>
projectResources
=
projectResourceMapper
.
selectList
(
wrapper
);
List
<
ProjectResource
>
projectResources
=
projectResourceMapper
.
selectList
(
wrapper
);
return
projectResources
;
return
projectResources
;
}
}
...
...
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