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
24158764
Commit
24158764
authored
Oct 21, 2022
by
曹盼盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人员,设备,管材的校验,以及校验成功公共方法,校验失败的公共方法
parent
9308f482
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
540 additions
and
109 deletions
+540
-109
StageEnum.java
.../com/yeejoin/amos/boot/module/ugp/api/Enum/StageEnum.java
+0
-0
AcceptDto.java
...a/com/yeejoin/amos/boot/module/ugp/api/dto/AcceptDto.java
+59
-0
SmartListDto.java
...om/yeejoin/amos/boot/module/ugp/api/dto/SmartListDto.java
+117
-0
Project.java
.../com/yeejoin/amos/boot/module/ugp/api/entity/Project.java
+0
-1
WeldMapper.java
...m/yeejoin/amos/boot/module/ugp/api/mapper/WeldMapper.java
+3
-0
IVerifyService.java
...join/amos/boot/module/ugp/api/service/IVerifyService.java
+2
-8
VerifyMapper.xml
...module-ugp-api/src/main/resources/mapper/VerifyMapper.xml
+2
-1
pom.xml
amos-boot-system-ugp/amos-boot-module-ugp-biz/pom.xml
+11
-0
VerifyController.java
...amos/boot/module/ugp/biz/controller/VerifyController.java
+84
-24
VerifyServiceImpl.java
...s/boot/module/ugp/biz/service/impl/VerifyServiceImpl.java
+262
-75
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/Enum/StageEnum.java
View file @
24158764
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/AcceptDto.java
View file @
24158764
...
...
@@ -6,6 +6,8 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* @Author cpp
* @Description
...
...
@@ -17,7 +19,64 @@ import lombok.EqualsAndHashCode;
public
class
AcceptDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
//人员信息
@ApiModelProperty
(
value
=
"项目id"
)
private
Long
projectId
;
@ApiModelProperty
(
value
=
"焊口编号"
)
private
String
code
;
@ApiModelProperty
(
value
=
"焊接定位信息"
)
private
String
peopleLocation
;
@ApiModelProperty
(
value
=
"人脸识别图片信息"
)
private
String
peoplePhoto
;
@ApiModelProperty
(
value
=
"人员id"
)
private
String
userId
;
@ApiModelProperty
(
value
=
"阶段检验"
)
private
String
stage
;
//设备
@ApiModelProperty
(
value
=
"设备id"
)
private
String
facilityId
;
@ApiModelProperty
(
value
=
"检定状态"
)
private
String
calibrationStatus
;
@ApiModelProperty
(
value
=
"设备图片"
)
private
String
facilityPhoto
;
//管材
@ApiModelProperty
(
value
=
"管材id"
)
private
String
materialId
;
@ApiModelProperty
(
value
=
"管材图片信息"
)
private
String
materialPhoto
;
//工艺
@ApiModelProperty
(
value
=
"焊接工艺"
)
private
String
craft
;
@ApiModelProperty
(
value
=
"焊机设备id"
)
private
String
weldingId
;
@ApiModelProperty
(
value
=
"工艺图片"
)
private
String
craftPhoto
;
//埋深
@ApiModelProperty
(
value
=
"埋深检测方式"
)
private
String
depthType
;
@ApiModelProperty
(
value
=
"埋深"
)
private
String
depth
;
@ApiModelProperty
(
value
=
"埋深定位信息"
)
private
String
depthLocation
;
@ApiModelProperty
(
value
=
"埋深图片信息"
)
private
String
depthPhoto
;
//耐压
@ApiModelProperty
(
value
=
"耐压设备id"
)
private
String
pressureId
;
@ApiModelProperty
(
value
=
"压力测试"
)
private
String
pressureTest
;
@ApiModelProperty
(
value
=
"耐压测试定位信息"
)
private
String
pressureLocation
;
@ApiModelProperty
(
value
=
"耐压图片信息"
)
private
String
pressurePhoto
;
//定位
@ApiModelProperty
(
value
=
"焊口精确定位方式"
)
private
String
locationType
;
@ApiModelProperty
(
value
=
"图片信息"
)
private
String
locationPhoto
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/SmartListDto.java
0 → 100644
View file @
24158764
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* @Author cpp
* @Description 智能监检列表
* @Date 2022/10/19
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"SmartListDto"
,
description
=
"智能监检列表"
)
public
class
SmartListDto
extends
BaseDto
{
@ApiModelProperty
(
value
=
"项目id"
)
private
Long
projectId
;
@ApiModelProperty
(
value
=
"项目名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"项目编号"
)
private
String
projectCode
;
@ApiModelProperty
(
value
=
"检验检测单位"
)
private
String
companyName
;
@ApiModelProperty
(
value
=
"检验负责人"
)
private
String
usrName
;
@ApiModelProperty
(
value
=
"检验员"
)
private
String
inspector
;
@ApiModelProperty
(
value
=
"检验状态"
)
private
String
status
;
@ApiModelProperty
(
value
=
"检验方式"
)
private
String
type
;
@ApiModelProperty
(
value
=
"交检日期"
)
private
Date
submitTime
;
@ApiModelProperty
(
value
=
"检验时间"
)
private
Date
verifyTime
;
//管材
@ApiModelProperty
(
value
=
"焊口编号"
)
private
String
code
;
@ApiModelProperty
(
value
=
"管材厂家"
)
private
String
manufacturer
;
@ApiModelProperty
(
value
=
"管材批号"
)
private
String
batchNumber
;
@ApiModelProperty
(
value
=
"质量许可"
)
private
String
permission
;
@ApiModelProperty
(
value
=
"焊工编号"
)
private
String
personWeld
;
@ApiModelProperty
(
value
=
"管材定位信息"
)
private
String
tubularlocatingInformation
;
//设备
@ApiModelProperty
(
value
=
"焊机编号"
)
private
String
facilityNumber
;
@ApiModelProperty
(
value
=
"焊机名称"
)
private
String
facilityName
;
@ApiModelProperty
(
value
=
"焊机定位信息"
)
private
String
facilityLocation
;
@ApiModelProperty
(
value
=
"检定状态"
)
private
String
facilityStatus
;
//人员
@ApiModelProperty
(
value
=
"焊工姓名"
)
private
String
peopleName
;
@ApiModelProperty
(
value
=
"持证状态"
)
private
String
peopleStatus
;
@ApiModelProperty
(
value
=
"焊接定位信息"
)
private
String
peopleLocation
;
// 工艺
@ApiModelProperty
(
value
=
"焊接工艺"
)
private
String
craft
;
@ApiModelProperty
(
value
=
"焊接时长"
)
private
String
duration
;
//耐压
@ApiModelProperty
(
value
=
"耐压测试编号"
)
private
String
pressureNumber
;
@ApiModelProperty
(
value
=
"耐压设备名称"
)
private
String
pressureName
;
@ApiModelProperty
(
value
=
"耐压设备编码"
)
private
String
pressureCode
;
@ApiModelProperty
(
value
=
"测试压力Mpa"
)
private
String
mpa
;
@ApiModelProperty
(
value
=
"耐压测试定位"
)
private
String
pressureLocation
;
//敷设位置标定检验
@ApiModelProperty
(
value
=
"焊口精确定位方式"
)
private
String
preciseWeldingPosition
;
@ApiModelProperty
(
value
=
"位置标定检验结果"
)
private
String
resuts
;
@ApiModelProperty
(
value
=
"检验检测阶段"
)
private
String
stage
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/entity/Project.java
View file @
24158764
...
...
@@ -148,5 +148,4 @@ public class Project extends BaseEntity {
*/
@TableField
(
"remark"
)
private
String
remark
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/WeldMapper.java
View file @
24158764
...
...
@@ -19,4 +19,7 @@ public interface WeldMapper extends BaseMapper<Weld> {
@Select
(
"select project_id,super_inspec_status from tz_ugp_weld where project_id =#{projectId}"
)
List
<
WeldDto
>
select
(
Long
projectId
);
@Select
(
"SELECT * from tz_ugp_weld where code = #{code} and project_id =#{projectId}"
)
Weld
getWeldByCodeAndProjectId
(
String
code
,
Long
projectId
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/service/IVerifyService.java
View file @
24158764
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.FacilityDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.IntelligentInspectionDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.TubingDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WorkerDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.SmartListDto
;
/**
* 智能监检管理表接口类
...
...
@@ -13,9 +10,6 @@ import com.yeejoin.amos.boot.module.ugp.api.dto.WorkerDto;
* @date 2022-09-22
*/
public
interface
IVerifyService
{
Page
<
TubingDto
>
selectInspection
(
Page
<
TubingDto
>
page
,
TubingDto
dto
);
Page
<
WorkerDto
>
selectWorker
(
Page
<
WorkerDto
>
page
,
WorkerDto
dto
);
Page
<
FacilityDto
>
selectFacility
(
Page
<
FacilityDto
>
page
,
FacilityDto
dto
);
Page
<
SmartListDto
>
commonality
(
String
stage
,
Page
<
SmartListDto
>
page
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/VerifyMapper.xml
View file @
24158764
...
...
@@ -48,9 +48,10 @@
vf.project_id =pt.sequence_nbr
and
pt.is_delete='0'
<if
test=
"stage != '' and stage != null"
>
and
vf.stage =#{stage}
</if>
</select>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-biz/pom.xml
View file @
24158764
...
...
@@ -21,6 +21,17 @@
<artifactId>
amos-boot-module-common-biz
</artifactId>
<version>
${amos-biz-boot.version}
</version>
</dependency>
<dependency>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-biz-common
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
<version>
1.2.24
</version>
</dependency>
</dependencies>
<build>
<plugins>
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/VerifyController.java
View file @
24158764
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.StageEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.*
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IVerifyService
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -111,7 +112,7 @@ public class VerifyController extends BaseController {
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"智能监检管理表列表全部数据查询"
,
notes
=
"智能监检管理表列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
VerifyDto
>>
selectForList
()
{
...
...
@@ -126,46 +127,42 @@ public class VerifyController extends BaseController {
/** cpp
*
*焊接管材检验信息列表
* @param current
* @param size
* @param dto
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/select
Inspection
"
)
@GetMapping
(
value
=
"/select
Tubular
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"焊接管材检验信息列表"
,
notes
=
"焊接管材检验信息列表"
)
public
ResponseModel
<
Page
<
TubingDto
>>
selectInspection
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
TubingDto
dto
)
{
Page
<
Tubing
Dto
>
page
=
new
Page
<>();
public
ResponseModel
<
Page
<
SmartListDto
>>
selectTubular
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
SmartList
Dto
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
service
.
selectInspection
(
page
,
dto
));
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
焊前管材质量
.
getStage
(),
page
));
}
/** cpp
*
*查询焊接人员检验信息列表
* @param current
* @param size
* @param
dto
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectWorker"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询焊接人员检验信息列表"
,
notes
=
"查询焊接人员检验信息列表"
)
public
ResponseModel
<
Page
<
Worker
Dto
>>
selectWorker
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
WorkerDto
dto
)
{
Page
<
Worker
Dto
>
page
=
new
Page
<>();
public
ResponseModel
<
Page
<
SmartList
Dto
>>
selectWorker
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
SmartList
Dto
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
service
.
selectWorker
(
page
,
dto
));
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
焊前人员
.
getStage
(),
page
));
}
/** cpp
...
...
@@ -173,41 +170,104 @@ public class VerifyController extends BaseController {
*查询焊接设备检验信息列表
* @param current
* @param size
* @param dto
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectFacility"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询焊接设备检验信息列表"
,
notes
=
"查询焊接设备检验信息列表"
)
public
ResponseModel
<
Page
<
Facility
Dto
>>
selectFacility
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
FacilityDto
dto
)
{
Page
<
Facility
Dto
>
page
=
new
Page
<>();
public
ResponseModel
<
Page
<
SmartList
Dto
>>
selectFacility
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
SmartList
Dto
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
service
.
selectFacility
(
page
,
dto
));
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
焊前设备
.
getStage
(),
page
));
}
/** cpp
*
*查询焊接工艺检验信息列表
* @param current
* @param size
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectCraft"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询焊接工艺检验信息列表"
,
notes
=
"查询焊接工艺检验信息列表"
)
public
ResponseModel
<
Page
<
SmartListDto
>>
selectCraft
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
SmartListDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
焊接工艺
.
getStage
(),
page
));
}
/** cpp
*
*查询管道耐压检验信息列表
* @param current
* @param size
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectVoltage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询管道耐压检验信息列表"
,
notes
=
"查询管道耐压检验信息列表"
)
public
ResponseModel
<
Page
<
SmartListDto
>>
selectVoltage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
SmartListDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
管道耐压
.
getStage
(),
page
));
}
/** cpp
*
*敷设位置标定检验列表
* @param current
* @param size
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectLocation"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"敷设位置标定检验列表"
,
notes
=
"敷设位置标定检验列表"
)
public
ResponseModel
<
Page
<
SmartListDto
>>
selectLocation
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
SmartListDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
定位
.
getStage
(),
page
));
}
/**
* cpp
*
* 校验
* @param dto
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/checks"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"校验app上传数据"
,
notes
=
"校验app上传数据"
)
public
ResponseModel
<
String
>
checks
(
@RequestBody
AcceptDto
dto
)
{
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
checks
(
dto
));
}
/**
* 焊接工艺效验
*/
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/VerifyServiceImpl.java
View file @
24158764
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.StageEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.VerifyEnum
;
...
...
@@ -18,9 +20,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.*
;
/**
* 智能监检管理表服务实现类
...
...
@@ -48,7 +48,6 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
public
Page
<
VerifyDto
>
queryForVerifyPage
(
Page
<
VerifyDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
...
...
@@ -62,20 +61,19 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
/**
/** cpp
* 智能监检共用查询方法
*
* stage 阶段
* page 分页
*/
public
List
<
IntelligentInspectionDto
>
commonality
(
String
stage
){
public
Page
<
SmartListDto
>
commonality
(
String
stage
,
Page
<
SmartListDto
>
page
){
List
<
Verify
>
commonality
=
verifyMapper
.
commonality
(
stage
);
List
<
IntelligentInspection
Dto
>
dtoList
=
new
ArrayList
<>();
List
<
SmartList
Dto
>
dtoList
=
new
ArrayList
<>();
//进入焊前
if
(
commonality
!=
null
&&
commonality
.
size
()
!=
0
){
for
(
Verify
verify
:
commonality
)
{
IntelligentInspectionDto
beforeDto
=
new
IntelligentInspection
Dto
(
);
SmartListDto
beforeDto
=
new
SmartList
Dto
(
);
beforeDto
.
setSequenceNbr
(
verify
.
getSequenceNbr
());
//智能监检表id
beforeDto
.
setProjectId
(
verify
.
getProjectId
());
//项目id
beforeDto
.
setName
(
verify
.
getProject
().
getName
());
//项目名称
...
...
@@ -86,111 +84,300 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
beforeDto
.
setVerifyTime
(
verify
.
getVerifyTime
());
//检验时间
beforeDto
.
setStage
(
verify
.
getStage
());
String
targetInfo
=
verify
.
getTargetInfo
();
//app上传数据
beforeDto
.
setTargetInfo
(
targetInfo
);
dtoList
.
add
(
beforeDto
);
}
}
return
dtoList
;
}
page
.
setRecords
(
dtoList
);
page
.
setTotal
(
dtoList
.
size
());
return
page
;
}
/**
* 查询焊接管材检验信息列表
* @param page
/** cpp
* 智能监检校验数据 人员 设备 管材
* @param dto
* @return
*/
@Override
public
Page
<
TubingDto
>
selectInspection
(
Page
<
TubingDto
>
page
,
TubingDto
dto
)
{
private
static
final
String
TYPE
=
"智能检验"
;
public
String
checks
(
AcceptDto
dto
)
{
List
<
IntelligentInspectionDto
>
commonality
=
this
.
commonality
(
StageEnum
.
焊前管材质量
.
getName
());
ArrayList
<
TubingDto
>
list
=
new
ArrayList
<>(
);
for
(
IntelligentInspectionDto
intelligentInspectionDto
:
commonality
)
{
TubingDto
tubingDto
=
new
TubingDto
(
);
BeanUtils
.
copyProperties
(
intelligentInspectionDto
,
tubingDto
);
list
.
add
(
tubingDto
);
if
(
dto
==
null
)
{
return
"数据不存在"
;
}
page
.
setRecords
(
list
);
page
.
setTotal
(
list
.
size
());
return
page
;
Verify
verify
=
new
Verify
(
);
//获取公共属性信息
Long
projectId
=
dto
.
getProjectId
(
);
//项目id
String
code
=
dto
.
getCode
(
);
//焊口编号
String
peopleLocation
=
dto
.
getPeopleLocation
(
);
//焊接定位信息
String
stage
=
dto
.
getStage
(
);
//阶段检验
//获取当前校验时间
Date
time
=
new
Date
(
);
//人员
if
(
stage
.
equals
(
StageEnum
.
焊前人员
.
getVerifyName
())&&
dto
.
getPeoplePhoto
()
!=
null
&&
!
dto
.
getPeoplePhoto
().
equals
(
""
))
{
//获取焊接人员校验信息
String
peoplePhoto
=
dto
.
getPeoplePhoto
(
);
//人脸识别图片信息
String
userId
=
dto
.
getUserId
(
);
//人员id
HashMap
<
String
,
String
>
map
=
new
HashMap
<>(
);
map
.
put
(
"peoplePhoto"
,
peoplePhoto
);
map
.
put
(
"code"
,
code
);
map
.
put
(
"peopleLocation"
,
peopleLocation
);
map
.
put
(
"userId"
,
userId
);
String
targetInfo
=
JSON
.
toJSONString
(
map
,
SerializerFeature
.
WriteMapNullValue
);
//焊口编号 人脸识别图片信息 焊接定位信息 人员id
verify
.
setSequenceNbr
(
new
Date
().
getTime
());
verify
.
setProjectId
(
projectId
);
verify
.
setStage
(
StageEnum
.
焊前人员
.
getStage
());
//阶段
verify
.
setType
(
TYPE
);
verify
.
setTargetInfo
(
targetInfo
);
verify
.
setVerifyTime
(
time
);
//数据校验
Boolean
falg
=
false
;
/**假设*/
if
(!
falg
)
{
/* //校验不通过,存入校验信息,
verify.setStatus(VerifyEnum.未通过.getStatus());
try {
int insert = verifyMapper.insert(verify);
} catch (Exception e) {
e.printStackTrace();
}
//将出现问题的哪一个阶段存入tz_ugp_quality_problem表中,返回失败
QualityProblem qualityProblem = new QualityProblem();
qualityProblem.setSequenceNbr(new Date().getTime());
qualityProblem.setProjectId(projectId);
//随机生成四位数
String s = String.valueOf((int) ((Math.random( ) * 9 + 1) * 1000));
qualityProblem.setCode(code+"-WT"+s);
qualityProblem.setGenerateStage(stage);
qualityProblem.setProblemDescribe(stage+"不通过");
qualityProblem.setStageVerifyId(verify.getSequenceNbr());
qualityProblemService.save(qualityProblem);
return VerifyEnum.未通过.getName();*/
this
.
addFailData
(
verify
,
new
QualityProblem
());
return
VerifyEnum
.
未通过
.
getName
();
}
//校验通过
/*//这个是判断过后需要存的状态
verify.setStatus(VerifyEnum.已通过.getStatus());
try {
//智能监检管理表添加数据
int insert = verifyMapper.insert(verify);
} catch (Exception e) {
e.printStackTrace( );
}
//焊口表存更改状态
Weld weld = weldMapper.getWeldByCodeAndProjectId(code, projectId);
weld.setSuperInspecStatus(stage);
LambdaQueryWrapper<Weld> wrapper = new LambdaQueryWrapper<>( );
wrapper.eq(Weld::getCode ,weld.getCode());
weldMapper.update(weld,wrapper);*/
this
.
addSuccessData
(
verify
);
/**
* 查询焊接人员检验信息列表
* @param page
* @param dto
* @return
*/
@Override
public
Page
<
WorkerDto
>
selectWorker
(
Page
<
WorkerDto
>
page
,
WorkerDto
dto
)
{
List
<
IntelligentInspectionDto
>
commonality
=
this
.
commonality
(
StageEnum
.
焊前人员
.
getName
());
ArrayList
<
WorkerDto
>
workerList
=
new
ArrayList
<>(
);
for
(
IntelligentInspectionDto
intelligentInspectionDto
:
commonality
)
{
WorkerDto
workerDto
=
new
WorkerDto
(
);
BeanUtils
.
copyProperties
(
intelligentInspectionDto
,
workerDto
);
workerList
.
add
(
workerDto
);
}
page
.
setRecords
(
workerList
);
page
.
setTotal
(
workerList
.
size
());
return
page
;
//设备
if
(
stage
.
equals
(
StageEnum
.
焊前设备
.
getVerifyName
())&&
dto
.
getFacilityPhoto
()
!=
null
&&
!
dto
.
getFacilityPhoto
().
equals
(
""
)){
//获取校验设备信息
String
facilityId
=
dto
.
getFacilityId
(
);
//设备id
String
calibrationStatus
=
dto
.
getCalibrationStatus
(
);
//检定状态
String
facilityPhoto
=
dto
.
getFacilityPhoto
(
);
//设备图片
HashMap
<
String
,
String
>
mapfacilty
=
new
HashMap
<>(
);
mapfacilty
.
put
(
"code"
,
code
);
//焊口编号
mapfacilty
.
put
(
"peopleLocation"
,
peopleLocation
);
//焊接定位信息
mapfacilty
.
put
(
"calibrationStatus"
,
calibrationStatus
);
mapfacilty
.
put
(
"facilityPhoto"
,
facilityPhoto
);
mapfacilty
.
put
(
"facilityId"
,
facilityId
);
String
targetInfo
=
JSON
.
toJSONString
(
mapfacilty
,
SerializerFeature
.
WriteMapNullValue
);
verify
.
setSequenceNbr
(
new
Date
().
getTime
());
//主键
verify
.
setProjectId
(
projectId
);
verify
.
setStage
(
StageEnum
.
焊前设备
.
getStage
());
verify
.
setTargetInfo
(
targetInfo
);
verify
.
setType
(
TYPE
);
verify
.
setVerifyTime
(
time
);
//数据校验
Boolean
flag
=
false
;
if
(!
flag
)
{
//校验不通过
this
.
addFailData
(
verify
,
new
QualityProblem
());
return
VerifyEnum
.
未通过
.
getName
();
}
//效验通过
this
.
addSuccessData
(
verify
);
}
//管材
if
(
stage
.
equals
(
StageEnum
.
焊前管材质量
.
getVerifyName
())&&
dto
.
getMaterialPhoto
()
!=
null
&&
!
dto
.
getMaterialPhoto
().
equals
(
""
)){
String
materialId
=
dto
.
getMaterialId
(
);
//管材id
String
materialPhoto
=
dto
.
getMaterialPhoto
(
);
//管材图片信息
HashMap
<
String
,
String
>
mapMaterial
=
new
HashMap
<>(
);
mapMaterial
.
put
(
"code"
,
code
);
mapMaterial
.
put
(
"materialId"
,
materialId
);
mapMaterial
.
put
(
"materialPhoto"
,
materialPhoto
);
mapMaterial
.
put
(
"peopleLocation"
,
peopleLocation
);
String
targetInfo
=
JSON
.
toJSONString
(
mapMaterial
,
SerializerFeature
.
WriteMapNullValue
);
verify
.
setTargetInfo
(
targetInfo
);
verify
.
setSequenceNbr
(
new
Date
().
getTime
());
verify
.
setStage
(
StageEnum
.
焊前管材质量
.
getStage
());
verify
.
setType
(
TYPE
);
verify
.
setVerifyTime
(
time
);
verify
.
setProjectId
(
projectId
);
/**
* 查询焊接设备检验信息列表
* @param page
* @param dto
* @return
*/
@Override
public
Page
<
FacilityDto
>
selectFacility
(
Page
<
FacilityDto
>
page
,
FacilityDto
dto
)
{
List
<
IntelligentInspectionDto
>
commonality
=
this
.
commonality
(
StageEnum
.
焊前设备
.
getName
());
ArrayList
<
FacilityDto
>
facilityList
=
new
ArrayList
<>(
)
;
for
(
IntelligentInspectionDto
intelligentInspectionDto
:
commonality
)
{
FacilityDto
facilityDto
=
new
FacilityDto
(
);
BeanUtils
.
copyProperties
(
intelligentInspectionDto
,
facilityDto
);
facilityList
.
add
(
facilityDto
);
//数据校验
Boolean
flag
=
false
;
if
(!
flag
)
{
//不通过, 添加数据并返回未通过结果
this
.
addFailData
(
verify
,
new
QualityProblem
()
);
return
VerifyEnum
.
未通过
.
getName
(
);
}
page
.
setRecords
(
facilityList
);
page
.
setTotal
(
facilityList
.
size
());
return
page
;
//校验通过
this
.
addSuccessData
(
verify
);
}
/**
* 智能监检校验数据
* @param dto
* @return
return
VerifyEnum
.
已通过
.
getName
();
}
/** cpp
* 校验失败需要添加的数据
* @param verify
* @param qualityProblem
*/
public
String
checks
(
AcceptDto
dto
)
{
if
(
dto
!=
null
)
{
// 校验数据
public
void
addFailData
(
Verify
verify
,
QualityProblem
qualityProblem
){
//校验不通过,存入校验信息,
verify
.
setStatus
(
VerifyEnum
.
未通过
.
getStatus
());
try
{
//智能监检管理表添加数据
int
insert
=
verifyMapper
.
insert
(
verify
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
//
//质量问题表添加数据
qualityProblem
.
setSequenceNbr
(
new
Date
().
getTime
());
qualityProblem
.
setProjectId
(
verify
.
getProjectId
());
//随机生成四位数
String
s
=
String
.
valueOf
((
int
)
((
Math
.
random
(
)
*
9
+
1
)
*
1000
));
String
targetInfo
=
verify
.
getTargetInfo
(
);
Map
map
=
JSON
.
parseObject
(
targetInfo
,
Map
.
class
);
for
(
Object
o:
map
.
keySet
()){
if
(
o
.
toString
().
equals
(
"code"
))
{
String
code
=
(
String
)
map
.
get
(
o
.
toString
(
));
qualityProblem
.
setCode
(
code
+
"-WT"
+
s
);
//获取焊口编码
}
}
qualityProblem
.
setGenerateStage
(
verify
.
getStage
());
qualityProblem
.
setProblemDescribe
(
verify
.
getStage
()+
"不通过"
);
qualityProblem
.
setStageVerifyId
(
verify
.
getSequenceNbr
());
qualityProblemService
.
save
(
qualityProblem
);
//调用方法判断
}
/** cpp
* 校验成功需要添加的数据
* @param verify
* @param
*/
public
void
addSuccessData
(
Verify
verify
){
//通过,将数据添加到verity表中,并返回ok
//效验通过状态
verify
.
setStatus
(
VerifyEnum
.
已通过
.
getStatus
());
try
{
//智能监检管理表添加数据
int
insert
=
verifyMapper
.
insert
(
verify
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
(
);
}
//焊口表存更改状态
String
targetInfo
=
verify
.
getTargetInfo
(
);
String
code
=
null
;
Map
map
=
JSON
.
parseObject
(
targetInfo
,
Map
.
class
);
for
(
Object
o:
map
.
keySet
()){
if
(
o
.
toString
().
equals
(
"code"
))
{
code
=(
String
)
map
.
get
(
o
.
toString
(
));
//如果不通过,将出现问题的哪一个阶段存入tz_ugp_quality_problem表中,返回失败
}
}
Weld
weld
=
weldMapper
.
getWeldByCodeAndProjectId
(
code
,
verify
.
getProjectId
());
if
(
weld
!=
null
)
{
//判断是哪一个阶段
String
stage
=
verify
.
getStage
(
);
Map
<
String
,
String
>
mapEnum
=
StageEnum
.
getNameByNameMap
;
for
(
String
s:
mapEnum
.
keySet
()){
if
(
stage
.
equals
(
s
))
{
String
name
=
mapEnum
.
get
(
s
);
//获取监检状态
weld
.
setSuperInspecStatus
(
name
);
}
}
LambdaQueryWrapper
<
Weld
>
wrapper
=
new
LambdaQueryWrapper
<>(
);
wrapper
.
eq
(
Weld:
:
getCode
,
weld
.
getCode
()).
eq
(
Weld:
:
getProjectId
,
weld
.
getProjectId
());
weldMapper
.
update
(
weld
,
wrapper
);
return
"ok"
;
}
}
private
String
效验状态
=
"已存在"
;
private
final
String
问题编码
=
"-WT"
;
...
...
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