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
22b81128
Commit
22b81128
authored
Nov 11, 2022
by
曹盼盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
bb5af7a9
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
285 additions
and
881 deletions
+285
-881
AuditEnum.java
.../com/yeejoin/amos/boot/module/ugp/api/Enum/AuditEnum.java
+39
-0
pom.xml
amos-boot-system-ugp/amos-boot-module-ugp-biz/pom.xml
+9
-0
InspectionController.java
.../boot/module/ugp/biz/controller/InspectionController.java
+1
-1
VerifyController.java
...amos/boot/module/ugp/biz/controller/VerifyController.java
+68
-118
ProjectInitiationServiceImpl.java
...le/ugp/biz/service/impl/ProjectInitiationServiceImpl.java
+106
-1
VerifyServiceImpl.java
...s/boot/module/ugp/biz/service/impl/VerifyServiceImpl.java
+62
-761
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/Enum/AuditEnum.java
0 → 100644
View file @
22b81128
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
Enum
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Author cpp
* @Description
* @Date 2022/11/10
*/
@Getter
@AllArgsConstructor
public
enum
AuditEnum
{
符合
(
"符合"
,
"1"
),
不符合且不需要整改
(
"不符合且不需要整改"
,
"0"
),
不符合且需要重新提交资料
(
"不符合且需要重新提交资料"
,
"2"
);
private
String
name
;
private
String
status
;
public
static
Map
<
String
,
String
>
getStatusByName
=
new
HashMap
<>();
public
static
Map
<
String
,
String
>
getNameByStatus
=
new
HashMap
<>();
static
{
for
(
AuditEnum
auditEnum:
AuditEnum
.
values
()){
getStatusByName
.
put
(
auditEnum
.
name
,
auditEnum
.
status
);
getNameByStatus
.
put
(
auditEnum
.
status
,
auditEnum
.
name
);
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/pom.xml
View file @
22b81128
...
...
@@ -31,11 +31,20 @@
<artifactId>
fastjson
</artifactId>
<version>
1.2.24
</version>
</dependency>
<!--pqr 和wps-->
<dependency>
<groupId>
fakepath
</groupId>
<artifactId>
ugp-welding-evaluation-inspection-sdk
</artifactId>
<version>
1.0.1
</version>
</dependency>
<!--调用python的依赖-->
<dependency>
<groupId>
org.python
</groupId>
<artifactId>
jython-standalone
</artifactId>
<version>
2.7.0
</version>
</dependency>
</dependencies>
<build>
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/InspectionController.java
View file @
22b81128
...
...
@@ -136,7 +136,7 @@ public class InspectionController {
return
page
;
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
""
,
notes
=
""
)
@GetMapping
(
"/saveInfo"
)
public
ResponseModel
<
String
>
saveInfo
(
@RequestBody
JSONObject
jsonObject
)
{
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/VerifyController.java
View file @
22b81128
...
...
@@ -5,7 +5,6 @@ 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.entity.Verify
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IVerifyService
;
import
netscape.javascript.JSObject
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
...
...
@@ -64,7 +63,7 @@ public class VerifyController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新智能监检管理表"
,
notes
=
"根据sequenceNbr更新智能监检管理表"
)
public
ResponseModel
<
VerifyDto
>
updateBySequenceNbrVerify
(
@RequestBody
VerifyDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
VerifyDto
>
updateBySequenceNbrVerify
(
@RequestBody
VerifyDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
updateWithModel
(
model
));
}
...
...
@@ -78,7 +77,7 @@ public class VerifyController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除智能监检管理表"
,
notes
=
"根据sequenceNbr删除智能监检管理表"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
removeById
(
sequenceNbr
));
}
...
...
@@ -90,7 +89,7 @@ public class VerifyController extends BaseController {
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个智能监检管理表"
,
notes
=
"根据sequenceNbr查询单个智能监检管理表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个智能监检管理表"
,
notes
=
"根据sequenceNbr查询单个智能监检管理表"
)
public
ResponseModel
<
VerifyDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
...
...
@@ -104,10 +103,10 @@ public class VerifyController extends BaseController {
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"智能监检管理表分页查询"
,
notes
=
"智能监检管理表分页查询"
)
public
ResponseModel
<
Page
<
VerifyDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"智能监检管理表分页查询"
,
notes
=
"智能监检管理表分页查询"
)
public
ResponseModel
<
Page
<
VerifyDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
VerifyDto
>
page
=
new
Page
<
VerifyDto
>(
);
Page
<
VerifyDto
>
page
=
new
Page
<
VerifyDto
>(
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
queryForVerifyPage
(
page
));
...
...
@@ -118,24 +117,17 @@ public class VerifyController extends BaseController {
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"智能监检管理表列表全部数据查询"
,
notes
=
"智能监检管理表列表全部数据查询"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"智能监检管理表列表全部数据查询"
,
notes
=
"智能监检管理表列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
VerifyDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
queryForVerifyList
(
));
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
queryForVerifyList
(
));
}
/** cpp
/**
* cpp
* <p>
* 焊接管材检验信息列表
*
*焊接管材检验信息列表
* @param current
* @param size
* @return
...
...
@@ -145,15 +137,18 @@ public class VerifyController extends BaseController {
@GetMapping
(
value
=
"/selectTubular"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"焊接管材检验信息列表"
,
notes
=
"焊接管材检验信息列表"
)
public
ResponseModel
<
Page
<
SmartListDto
>>
selectTubular
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
SmartListDto
smartListDto
)
{
Page
<
SmartListDto
>
page
=
new
Page
<>();
(
value
=
"size"
)
int
size
,
SmartListDto
smartListDto
)
{
Page
<
SmartListDto
>
page
=
new
Page
<>(
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
焊前管材质量
.
getStage
(
),
page
,
smartListDto
));
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
焊前管材质量
.
getStage
(
),
page
,
smartListDto
));
}
/** cpp
/**
* cpp
* <p>
* 查询焊接人员检验信息列表
*
*查询焊接人员检验信息列表
* @param current
* @param size
* @param
...
...
@@ -164,34 +159,38 @@ public class VerifyController extends BaseController {
@GetMapping
(
value
=
"/selectWorker"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询焊接人员检验信息列表"
,
notes
=
"查询焊接人员检验信息列表"
)
public
ResponseModel
<
Page
<
SmartListDto
>>
selectWorker
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
SmartListDto
smartListDto
)
{
Page
<
SmartListDto
>
page
=
new
Page
<>();
(
value
=
"size"
)
int
size
,
SmartListDto
smartListDto
)
{
Page
<
SmartListDto
>
page
=
new
Page
<>(
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
焊前人员
.
getStage
(
),
page
,
smartListDto
));
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
焊前人员
.
getStage
(
),
page
,
smartListDto
));
}
/** cpp
/**
* cpp
* <p>
* 查询焊接设备检验信息列表
*
*查询焊接设备检验信息列表
* @param current
* @param size
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectFacility"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询焊接设备检验信息列表"
,
notes
=
"查询焊接设备检验信息列表"
)
public
ResponseModel
<
Page
<
SmartListDto
>>
selectFacility
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
SmartListDto
smartListDto
)
{
Page
<
SmartListDto
>
page
=
new
Page
<>();
(
value
=
"size"
)
int
size
,
SmartListDto
smartListDto
)
{
Page
<
SmartListDto
>
page
=
new
Page
<>(
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
焊前设备
.
getStage
(
),
page
,
smartListDto
));
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
焊前设备
.
getStage
(
),
page
,
smartListDto
));
}
/** cpp
/**
* cpp
* <p>
* 查询焊接工艺检验信息列表
*
*查询焊接工艺检验信息列表
* @param current
* @param size
* @return
...
...
@@ -201,34 +200,36 @@ public class VerifyController extends BaseController {
@GetMapping
(
value
=
"/selectCraft"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询焊接工艺检验信息列表"
,
notes
=
"查询焊接工艺检验信息列表"
)
public
ResponseModel
<
Page
<
SmartListDto
>>
selectCraft
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
SmartListDto
smartListDto
)
{
Page
<
SmartListDto
>
page
=
new
Page
<>();
(
value
=
"size"
)
int
size
,
SmartListDto
smartListDto
)
{
Page
<
SmartListDto
>
page
=
new
Page
<>(
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
焊接工艺
.
getStage
(
),
page
,
smartListDto
));
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
焊接工艺
.
getStage
(
),
page
,
smartListDto
));
}
/** cpp
/**
* cpp
* <p>
* 查询管道耐压检验信息列表
*
*查询管道耐压检验信息列表
* @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
,
SmartListDto
smartListDto
)
{
Page
<
SmartListDto
>
page
=
new
Page
<>();
(
value
=
"size"
)
int
size
,
SmartListDto
smartListDto
)
{
Page
<
SmartListDto
>
page
=
new
Page
<>(
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
管道耐压
.
getStage
(
),
page
,
smartListDto
));
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
管道耐压
.
getStage
(
),
page
,
smartListDto
));
}
/**
* 敷设质量
*
* @param current
* @param size
* @param smartListDto
...
...
@@ -238,35 +239,37 @@ public class VerifyController extends BaseController {
@GetMapping
(
value
=
"/depth"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"敷设质量"
,
notes
=
"敷设质量"
)
public
ResponseModel
<
Page
<
SmartListDto
>>
depth
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
SmartListDto
smartListDto
)
{
Page
<
SmartListDto
>
page
=
new
Page
<>();
(
value
=
"size"
)
int
size
,
SmartListDto
smartListDto
)
{
Page
<
SmartListDto
>
page
=
new
Page
<>(
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
敷设质量
.
getStage
(
),
page
,
smartListDto
));
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
敷设质量
.
getStage
(
),
page
,
smartListDto
));
}
/** cpp
/**
* cpp
* <p>
* 位置标定检验列表
*
*位置标定检验列表
* @param current
* @param size
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/selectLocation"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"敷设位置标定检验列表"
,
notes
=
"敷设位置标定检验列表"
)
public
ResponseModel
<
Page
<
SmartListDto
>>
selectLocation
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
SmartListDto
smartListDto
)
{
Page
<
SmartListDto
>
page
=
new
Page
<>();
(
value
=
"size"
)
int
size
,
SmartListDto
smartListDto
)
{
Page
<
SmartListDto
>
page
=
new
Page
<>(
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
定位
.
getStage
(
),
page
,
smartListDto
));
return
ResponseHelper
.
buildResponse
(
service
.
commonality
(
StageEnum
.
定位
.
getStage
(
),
page
,
smartListDto
));
}
/**
* cpp
* 校验
*
* @param jsonObject
* @return
*/
...
...
@@ -280,26 +283,28 @@ public class VerifyController extends BaseController {
/**
* cpp
* 主键id查询verity表
*
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectById"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"主键id查询verity表"
,
notes
=
"主键id查询verity表"
)
public
ResponseModel
<
OpenDto
>
selectById
(
@RequestParam
Long
sequenceNbr
)
{
public
ResponseModel
<
OpenDto
>
selectById
(
@RequestParam
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
selectById
(
sequenceNbr
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/photo"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取图片"
,
notes
=
"获取图片"
)
public
ResponseModel
<
Map
>
photo
(
@RequestParam
Long
sequenceNbr
)
{
Map
map
=
new
HashMap
<>(
);
map
.
put
(
"newPhoto"
,
"https://img2.baidu.com/it/u=806791452,2765805606&fm=253&fmt=auto&app=138&f=JPEG?w=350&h=500"
);
public
ResponseModel
<
Map
>
photo
(
@RequestParam
Long
sequenceNbr
)
{
Map
map
=
new
HashMap
<>(
);
map
.
put
(
"newPhoto"
,
"https://img2.baidu.com/it/u=806791452,2765805606&fm=253&fmt=auto&app=138&f=JPEG?w=350&h=500"
);
return
ResponseHelper
.
buildResponse
(
map
);
}
}
...
...
@@ -315,60 +320,5 @@ public class VerifyController extends BaseController {
/**
* 焊接工艺效验
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"焊接工艺效验"
,
notes
=
"焊接工艺效验"
)
@PostMapping
(
value
=
"/weldeEffect"
)
public
ResponseModel
<
String
>
weldEffect
(
@RequestBody
JSONObject
jsonObject
)
{
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
weldEffect
(
jsonObject
));
}
/**
* 管材耐压效验
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"管材耐压效验"
,
notes
=
"管材耐压效验"
)
@PostMapping
(
value
=
"/materialEffect"
)
public
ResponseModel
<
String
>
materialEffect
(
@RequestBody
JSONObject
jsonObject
)
{
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
materialEffect
(
jsonObject
));
}
/**
* 敷设质量检验
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"敷设质量检验"
,
notes
=
"敷设质量检验"
)
@PostMapping
(
value
=
"/layEffect"
)
public
ResponseModel
<
String
>
layEffect
(
@RequestBody
JSONObject
jsonObject
)
{
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
layEffect
(
jsonObject
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"焊口敷设位置标定检验"
,
notes
=
"焊口敷设位置标定检验"
)
@PostMapping
(
value
=
"/postadd"
)
public
ResponseModel
<
String
>
postadd
(
@RequestBody
JSONObject
jsonObject
)
{
String
code
=
jsonObject
.
getString
(
"code"
);
Long
projectId
=
jsonObject
.
getLong
(
"projectId"
);
jsonObject
.
getString
(
"userId"
);
Verify
verify
=
new
Verify
(
);
verify
.
setProjectId
(
projectId
);
verify
.
setTargetInfo
(
code
);
boolean
save
=
verifyServiceImpl
.
save
(
verify
);
if
(!
save
)
{
//
return
ResponseHelper
.
buildResponse
(
"新增失败"
);
}
return
ResponseHelper
.
buildResponse
(
"成功"
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectInitiationServiceImpl.java
View file @
22b81128
...
...
@@ -8,10 +8,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.google.common.collect.Maps
;
import
com.mao.expertSystem.WeldingQualification
;
import
com.mao.expertSystem.material.MyPqr
;
import
com.mao.expertSystem.material.MyWps
;
import
com.yeejoin.amos.boot.biz.common.service.impl.WorkflowExcuteServiceImpl
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.AuditEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectInitiationEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.SMSEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Util.CommonResponse
;
...
...
@@ -153,7 +157,6 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
}
}
try
{
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
...
...
@@ -176,6 +179,108 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
}
}
/*焊评审核(后期优化)
* @return
*/
public
String
evaluateMethod
(
String
sequenceNbr
,
JSONObject
json
)
{
//获取文档信息(2个文档 wps pqr)
JSONArray
subForm
=
json
.
getJSONArray
(
"subForm"
);
JSONObject
jsonObject1
=
subForm
.
getJSONObject
(
0
);
JSONArray
info
=
jsonObject1
.
getJSONArray
(
"info"
);
//info里面上传两个文档
JSONObject
js1
=
info
.
getJSONObject
(
0
);
JSONObject
js2
=
info
.
getJSONObject
(
1
);
String
name1
=
js1
.
getString
(
"name"
);
String
url1
=
js1
.
getString
(
"url"
);
String
name2
=
js1
.
getString
(
"name"
);
String
url2
=
js2
.
getString
(
"url"
);
//文档下载,调用python 文字识别
//识别结果,将结果放到pqr wps
MyPqr
pqr
=
new
MyPqr
(
);
MyWps
wps
=
new
MyWps
(
);
pqr
.
setWelding_method
(
json
.
getString
(
"pqr_welding_method"
));
pqr
.
setMaterial_a_number
(
json
.
getString
(
"pqr_material_a_number"
));
pqr
.
setMaterial_a_class
(
json
.
getString
(
"pqr_material_a_class"
));
pqr
.
setMaterial_a_thickness
(
json
.
getDouble
(
"pqr_material_a_thickness"
));
pqr
.
setMaterial_a_group
(
json
.
getString
(
"pqr_material_a_group"
));
pqr
.
setMaterial_a_standard
(
json
.
getString
(
"pqr_material_a_standard"
));
pqr
.
setMaterial_b_number
(
json
.
getString
(
"pqr_material_b_number"
));
pqr
.
setMaterial_b_class
(
json
.
getString
(
"pqr_material_b_class"
));
pqr
.
setMaterial_b_thickness
(
json
.
getDouble
(
"pqr_material_b_thickness"
));
pqr
.
setMaterial_b_group
(
json
.
getString
(
"pqr_material_b_group"
));
pqr
.
setMaterial_b_standard
(
json
.
getString
(
"pqr_material_b_standard"
));
pqr
.
setIf_shock
(
json
.
getString
(
"pqr_if_shock"
));
pqr
.
setIf_bend
(
json
.
getString
(
"pqr_if_bend"
));
pqr
.
setGtaw_weld_material_class
(
json
.
getString
(
"pqr_gtaw_weld_material_class"
));
pqr
.
setSmaw_weld_material_class
(
json
.
getString
(
"pqr_smaw_weld_material_class"
));
pqr
.
setSaw_weld_material_class_1
(
json
.
getString
(
"pqr_saw_weld_material_class_1"
));
pqr
.
setSaw_weld_material_class_2
(
json
.
getString
(
"pqr_saw_weld_material_class_2"
));
pqr
.
setGmaw_weld_material_class
(
json
.
getString
(
"pqr_gmaw_weld_material_class"
));
pqr
.
setIf_heat_treatment
(
json
.
getString
(
"pqr_if_heat_treatment"
));
pqr
.
setTemperature
(
json
.
getDouble
(
"pqr_temperature"
));
pqr
.
setCombox_type
(
json
.
getString
(
"pqr_combox_type"
));
pqr
.
setTemperature_time
(
json
.
getDouble
(
"pqr_temperature_time"
));
pqr
.
setMaterial_minT_of_a_b_thickness
(
json
.
getDouble
(
"pqr_material_minT_of_a_b_thickness"
));
wps
.
setWelding_method
(
json
.
getString
(
"wps_welding_method"
));
wps
.
setMaterial_a_number
(
json
.
getString
(
"wps_material_a_number"
));
wps
.
setMaterial_a_class
(
json
.
getString
(
"wps_material_a_class"
));
wps
.
setMaterial_a_thickness
(
json
.
getDouble
(
"wps_material_a_thickness"
));
wps
.
setMaterial_a_group
(
json
.
getString
(
"wps_material_a_group"
));
wps
.
setMaterial_a_standard
(
json
.
getString
(
"wps_material_a_standard"
));
wps
.
setMaterial_b_number
(
json
.
getString
(
"wps_material_b_number"
));
wps
.
setMaterial_b_class
(
json
.
getString
(
"wps_material_b_class"
));
wps
.
setMaterial_b_thickness
(
json
.
getDouble
(
"wps_material_b_thickness"
));
wps
.
setMaterial_b_group
(
json
.
getString
(
"wps_material_b_group"
));
wps
.
setMaterial_b_standard
(
json
.
getString
(
"wps_material_b_standard"
));
wps
.
setIf_shock
(
json
.
getString
(
"wps_if_shock"
));
wps
.
setIf_bend
(
json
.
getString
(
"wps_if_bend"
));
wps
.
setGtaw_weld_material_class
(
json
.
getString
(
"wps_gtaw_weld_material_class"
));
wps
.
setSmaw_weld_material_class
(
json
.
getString
(
"wps_smaw_weld_material_class"
));
wps
.
setSaw_weld_material_class_1
(
json
.
getString
(
"wps_saw_weld_material_class_1"
));
wps
.
setSaw_weld_material_class_2
(
json
.
getString
(
"wps_saw_weld_material_class_2"
));
wps
.
setGmaw_weld_material_class
(
json
.
getString
(
"wps_gmaw_weld_material_class"
));
wps
.
setIf_heat_treatment
(
json
.
getString
(
"wps_if_heat_treatment"
));
wps
.
setTemperature
(
json
.
getDouble
(
"wps_temperature"
));
wps
.
setCombox_type
(
json
.
getString
(
"wps_combox_type"
));
wps
.
setTemperature_time
(
json
.
getDouble
(
"wps_temperature_time"
));
wps
.
setMaterial_minT_of_a_b_thickness
(
json
.
getDouble
(
"wps_material_minT_of_a_b_thickness"
));
HashMap
<
String
,
String
>
stringStringHashMap
=
new
WeldingQualification
(
).
equipmentWeldingQualification
(
pqr
,
wps
);
//结果(假设)
String
reslut
=
AuditEnum
.
符合
.
getName
();
String
option
=
AuditEnum
.
getNameByStatus
.
get
(
reslut
);
Project
project
=
projectServiceImpl
.
getById
(
sequenceNbr
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
project
));
jsonObject
.
put
(
XJConstant
.
PROCESS_PROJECT_STATE
,
AuditEnum
.
符合
.
getName
());
if
(
AuditEnum
.
不符合且不需要整改
.
getStatus
().
equals
(
option
)){
jsonObject
.
put
(
XJConstant
.
PROCESS_PROJECT_STATE
,
AuditEnum
.
不符合且不需要整改
.
getName
());
projectInitiationService
.
execute
(
project
.
getInstanceId
(),
jsonObject
,
option
);
projectInitiationService
.
execute
(
project
.
getInstanceId
(),
jsonObject
,
option
);
}
else
if
(
AuditEnum
.
不符合且需要重新提交资料
.
getStatus
().
equals
(
option
)){
jsonObject
.
put
(
XJConstant
.
PROCESS_PROJECT_STATE
,
AuditEnum
.
不符合且需要重新提交资料
.
getName
());
}
projectInitiationService
.
execute
(
project
.
getInstanceId
(),
jsonObject
,
option
);
return
stringStringHashMap
.
toString
();
}
/**
* 获取流程当前任务名称
* @param instanceId
...
...
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 @
22b81128
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
...
...
@@ -20,8 +21,10 @@ import com.yeejoin.amos.boot.module.ugp.api.Enum.VerifyEnum;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.VerifyTypeEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.constants.XJConstant
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.*
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.QualityProblem
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Verify
;
...
...
@@ -44,9 +47,12 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
java.awt.*
;
import
java.util.*
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -94,6 +100,8 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
@Autowired
QualityProblemServiceImpl
qualityProblemService
;
@Autowired
ProjectServiceImpl
projectServiceImpl
;
/**
...
...
@@ -109,21 +117,14 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
/**
* 列表查询 示例
*/
public
List
<
VerifyDto
>
queryForVerifyList
()
{
return
this
.
queryForList
(
""
,
false
);
}
/** cpp
* 智能监检共用查询方法
* stage 阶段
* page 分页
*/
private
static
final
String
HEGE
=
"合格期内"
;
private
static
final
String
NOTHEGE
=
"超期未检"
;
...
...
@@ -132,10 +133,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
List
<
SmartListDto
>
dtoList
=
new
ArrayList
<>();
//进入焊前
if
(
verifyList
!=
null
&&
verifyList
.
size
()
!=
0
){
for
(
Verify
verify
:
verifyList
)
{
SmartListDto
dto
=
new
SmartListDto
(
);
dto
.
setSequenceNbr
(
verify
.
getSequenceNbr
());
//智能监检表id
dto
.
setProjectId
(
verify
.
getProjectId
());
//项目id
...
...
@@ -150,10 +148,9 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
dto
.
setStatus
(
VerifyEnum
.
未通过
.
getName
());
}
dto
.
setType
(
verify
.
getType
());
//检验方式
dto
.
setSubmitTime
(
verify
.
get
Submit
Time
());
//交检日期
dto
.
setSubmitTime
(
verify
.
get
Verify
Time
());
//交检日期
dto
.
setVerifyTime
(
verify
.
getVerifyTime
());
//检验时间
String
stage1
=
verify
.
getStage
(
);
//检验检测阶段
Map
<
String
,
String
>
map
=
StageEnum
.
getStatusByVerifyNameMap
;
for
(
String
key:
map
.
keySet
()){
if
(
key
.
equals
(
stage1
))
{
...
...
@@ -161,141 +158,104 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
}
}
String
targetInfo
=
verify
.
getTargetInfo
();
//app上传数据
Map
mapInfo
=
JSON
.
parseObject
(
targetInfo
,
Map
.
class
);
for
(
Object
o:
mapInfo
.
keySet
()){
if
(
o
.
toString
().
equals
(
"code"
))
{
//获取焊口编号
String
code
=
(
String
)
mapInfo
.
get
(
o
.
toString
(
));
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
targetInfo
);
String
code
=
jsonObject
.
getString
(
"code"
);
//焊口编码
String
manyCode
=
jsonObject
.
getString
(
"manyCode"
);
if
(!
StringUtils
.
isEmpty
(
code
))
{
dto
.
setCode
(
code
);
}
if
(
o
.
toString
().
equals
(
"peopleLocation"
))
{
//获取焊接定位信息
String
peopleLocation
=
(
String
)
mapInfo
.
get
(
o
.
toString
(
));
dto
.
setPeopleLocation
(
peopleLocation
);
if
(!
StringUtils
.
isEmpty
(
manyCode
))
{
dto
.
setCode
(
manyCode
);
}
String
location
=
jsonObject
.
getString
(
"location"
);
if
(!
StringUtils
.
isEmpty
(
location
))
{
dto
.
setPeopleLocation
(
location
);
}
//人员
if
(
o
.
toString
().
equals
(
"userId"
))
{
//获取焊工信息
String
userId
=
mapInfo
.
get
(
o
.
toString
(
)).
toString
();
if
(
userId
!=
null
)
{
OrgUsr
orgUsr
=
orgService
.
getOrgUsrById
(
userId
);
Long
welderId
=
jsonObject
.
getLong
(
"welderId"
);
if
(
welderId
!=
null
)
{
OrgUsr
orgUsr
=
orgService
.
getOrgUsrById
(
welderId
.
toString
());
if
(
orgUsr
!=
null
)
{
if
(!
StringUtils
.
isEmpty
(
orgUsr
.
getBizOrgName
()))
{
dto
.
setPeopleName
(
orgUsr
.
getBizOrgName
());
//焊工姓名
}
if
(!
StringUtils
.
isEmpty
(
orgUsr
.
getCode
()))
{
dto
.
setPersonWeld
(
orgUsr
.
getCode
());
//焊工编号
}
}
//持证判断
//设备
if
(
o
.
toString
().
equals
(
"facilityId"
))
{
//设备id
Long
eId
=
Long
.
valueOf
(
mapInfo
.
get
(
o
.
toString
(
)).
toString
());
if
(
eId
!=
null
)
{
//获取设备
EquipmentDto
equipmentDto
=
equipmentService
.
queryBySeq
(
eId
);
}
//持证判断(写死)
dto
.
setPeopleStatus
(
"合格期内"
);
dto
.
setFacilityStatus
(
"合格期内"
);
dto
.
setCompanyName
(
"检测单位"
);
dto
.
setUsrName
(
"检验负责人"
);
dto
.
setInspector
(
"cs"
);
dto
.
setFacilityNumber
(
"XH007"
);
dto
.
setFacilityName
(
"焊机xxx"
);
dto
.
setDuration
(
"6"
);
dto
.
setPressureNumber
(
"1xm001"
);
dto
.
setPressureName
(
"耐压设备"
);
dto
.
setPressureCode
(
"DF988x"
);
Long
weldingId
=
jsonObject
.
getLong
(
"weldingId"
);
if
(
weldingId
!=
null
)
{
EquipmentDto
equipmentDto
=
equipmentService
.
queryBySeq
(
weldingId
);
if
(
equipmentDto
!=
null
)
{
//设备名 设备编号
dto
.
setFacilityName
(
equipmentDto
.
getName
());
dto
.
setFacilityNumber
(
equipmentDto
.
getCode
());
}
}
}
//管材
if
(
o
.
toString
().
equals
(
"materialId"
))
{
//管材id
Long
mId
=
Long
.
valueOf
(
mapInfo
.
get
(
o
.
toString
(
)).
toString
());
if
(
mId
!=
null
)
{
MaterialDto
materialDto
=
materialService
.
queryBySeq
(
mId
);
Long
materialId
=
jsonObject
.
getLong
(
"materialId"
);
if
(
materialId
!=
null
)
{
MaterialDto
materialDto
=
materialService
.
queryBySeq
(
materialId
);
if
(
materialDto
!=
null
)
{
//管材厂家 生产编号
dto
.
setManufacturer
(
materialDto
.
getManufacturer
());
dto
.
setBatchNumber
(
materialDto
.
getBatchNum
());
//生产日期需要判断(加判断)是否在有效期内
Date
manufactureDate
=
materialDto
.
getManufactureDate
(
);
//将判断结果
dto
.
setPermission
(
HEGE
);
}
}
}
//工艺
if
(
o
.
toString
().
equals
(
"craft"
))
{
//获取焊接工艺
String
craft
=
mapInfo
.
get
(
o
.
toString
(
)).
toString
();
String
craft
=
jsonObject
.
getString
(
"craft"
);
if
(!
StringUtils
.
isEmpty
(
craft
))
{
dto
.
setCraft
(
craft
);
}
}
if
(
o
.
toString
().
equals
(
"weldingId"
))
{
//设备id
Long
eId
=
Long
.
valueOf
(
mapInfo
.
get
(
o
.
toString
(
)).
toString
());
if
(
eId
!=
null
)
{
//获取设备
EquipmentDto
equipmentDto
=
equipmentService
.
queryBySeq
(
eId
);
if
(!
StringUtils
.
isEmpty
(
equipmentDto
.
getCode
()))
{
// 焊机编号
dto
.
setFacilityNumber
(
equipmentDto
.
getCode
());
}
}
}
//耐压
if
(
o
.
toString
().
equals
(
"pressureId"
))
{
Long
pressureId
=
Long
.
valueOf
(
mapInfo
.
get
(
o
.
toString
(
)).
toString
());
if
(
pressureId
!=
null
)
{
Long
pressureId
=
jsonObject
.
getLong
(
"pressureId"
);
if
(
pressureId
!=
null
)
{
EquipmentDto
equipmentDto
=
equipmentService
.
queryBySeq
(
pressureId
);
if
(
equipmentDto
!=
null
&&
!
StringUtils
.
isEmpty
(
equipmentDto
.
getName
())
&&!
StringUtils
.
isEmpty
(
equipmentDto
.
getCode
()))
{
dto
.
setPressureName
(
equipmentDto
.
getName
());
dto
.
setPressureCode
(
equipmentDto
.
getCode
());
}
}
String
pressureTest
=
jsonObject
.
getString
(
"pressureTest"
);
if
(!
StringUtils
.
isEmpty
(
pressureTest
))
{
dto
.
setMpa
(
pressureTest
);
}
if
(
o
.
toString
().
equals
(
"pressureTest"
))
{
String
mpa
=
mapInfo
.
get
(
o
.
toString
(
)).
toString
();
if
(!
StringUtils
.
isEmpty
(
mpa
))
{
dto
.
setMpa
(
mpa
);
}
}
//埋深 埋深检测方式
if
(
o
.
toString
().
equals
(
"depthType"
))
{
String
depthType
=
mapInfo
.
get
(
o
.
toString
(
)).
toString
();
//埋深
String
depthType
=
jsonObject
.
getString
(
"depthType"
);
if
(!
StringUtils
.
isEmpty
(
depthType
))
{
dto
.
setDetectionMethod
(
depthType
);
}
}
if
(
o
.
toString
().
equals
(
"depth"
))
{
String
depth
=
mapInfo
.
get
(
o
.
toString
(
)).
toString
();
String
depth
=
jsonObject
.
getString
(
"depth"
);
if
(!
StringUtils
.
isEmpty
(
depth
))
{
dto
.
setBurialDepth
(
depth
);
}
}
//位置标定
if
(
o
.
toString
().
equals
(
"locationType"
))
{
String
locationType
=
mapInfo
.
get
(
o
.
toString
(
)).
toString
();
String
locationType
=
jsonObject
.
getString
(
"locationType"
);
if
(!
StringUtils
.
isEmpty
(
locationType
))
{
dto
.
setPreciseWeldingPosition
(
locationType
);
}
}
//判断标定检验结果 getResuts
}
// //判断标定检验结果 (写死) getResuts
dto
.
setResuts
(
"合格"
);
dtoList
.
add
(
dto
);
}
...
...
@@ -330,6 +290,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
Date
time
=
new
Date
();
// //获取当前校验时间
String
photo
=
jsonObject
.
getString
(
"photo"
);
//图片
Verify
verify
=
new
Verify
(
);
jsonObject
.
put
(
"welderId"
,
welderId
);
//属性赋值
String
targetInfo
=
jsonObject
.
toString
();
verify
.
setTargetInfo
(
targetInfo
);
//json信息
...
...
@@ -777,570 +738,11 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
}
private
String
效验状态
=
"已存在"
;
private
final
String
问题编码
=
"-WT"
;
/**
* 公共效验接口
*/
public
String
effect
(
JSONObject
jsonObject
,
Integer
效验数量
,
Boolean
i
)
{
// String 效验状态 = "已存在";
Verify
verify
=
new
Verify
();
//添加筛选条件
LambdaQueryWrapper
<
Verify
>
wrapper
=
new
LambdaQueryWrapper
<>();
//获取target_info
JSONObject
targetInfo
=
jsonObject
.
getJSONObject
(
"target_info"
);
String
code
=
targetInfo
.
getString
(
"code"
);
//筛选出本焊口监检数
wrapper
.
eq
(
Verify:
:
getCode
,
code
);
//改焊口焊前数据
Integer
verifyCount
=
verifyMapper
.
selectCount
(
wrapper
);
if
(
verifyCount
==
效验数量
)
{
wrapper
.
eq
(
Verify:
:
getStatus
,
VerifyEnum
.
已通过
.
getStatus
());
//该焊口焊前效验通过数据
Integer
integer
=
verifyMapper
.
selectCount
(
wrapper
);
//判断入库数量
if
(
integer
==
效验数量
)
{
verify
.
setProjectId
(
jsonObject
.
getLong
(
"projectId"
));
verify
.
setCode
(
jsonObject
.
getString
(
"code"
));
verify
.
setTargetInfo
(
jsonObject
.
getString
(
"target_info"
));
verify
.
setSubmitTime
(
new
Date
());
verify
.
setVerifyTime
(
new
Date
());
verify
.
setType
(
VerifyTypeEnum
.
智能检验
.
getStatus
());
//获取操作阶段
String
stage
=
targetInfo
.
getString
(
"stage"
);
verify
.
setStage
(
stage
);
//获取效验接口
if
(
i
)
{
verify
.
setStatus
(
VerifyEnum
.
已通过
.
getStatus
());
//添加筛选条件
LambdaQueryWrapper
<
Weld
>
wrapperWeld
=
new
LambdaQueryWrapper
<>();
wrapperWeld
.
eq
(
Weld:
:
getCode
,
jsonObject
.
getString
(
"code"
));
Weld
weld
=
weldMapper
.
selectOne
(
wrapperWeld
);
weld
.
setSuperInspecStatus
(
stage
);
weldService
.
updateById
(
weld
);
效验状态
=
"已通过"
;
this
.
save
(
verify
);
}
else
{
int
math
=
(
int
)
((
Math
.
random
()
*
9
+
1
)*
1000
);
verify
.
setStatus
(
VerifyEnum
.
未通过
.
getStatus
());
this
.
save
(
verify
);
LambdaQueryWrapper
<
Verify
>
wrapperVerify
=
new
LambdaQueryWrapper
<>();
wrapperVerify
.
eq
(
Verify:
:
getCode
,
jsonObject
.
getString
(
"code"
));
wrapperVerify
.
eq
(
Verify:
:
getStage
,
stage
);
Verify
verifyId
=
verifyMapper
.
selectOne
(
wrapperVerify
);
QualityProblem
qualityProblem
=
new
QualityProblem
();
//生成问题编码
qualityProblem
.
setStageVerifyId
(
verifyId
.
getSequenceNbr
());
qualityProblem
.
setCode
(
jsonObject
.
getString
(
"code"
)+
问题编码
+
math
);
qualityProblem
.
setProjectId
(
jsonObject
.
getLong
(
"projectId"
));
qualityProblem
.
setGenerateStage
(
stage
);
qualityProblem
.
setSubmitDate
(
new
Date
());
qualityProblemService
.
save
(
qualityProblem
);
效验状态
=
"未通过"
;
}
}
}
return
效验状态
;
}
/**
* 焊接工艺效验
*/
private
final
Integer
焊前效验数量
=
3
;
public
String
weldEffect
(
JSONObject
jsonObject
)
{
// Verify verify = new Verify();
// //添加筛选条件
// LambdaQueryWrapper<Verify> wrapper = new LambdaQueryWrapper<>();
// JSONObject targetInfo = jsonObject.getJSONObject("target_info");
// String code = targetInfo.getString("code");
// //筛选出本焊口监检数
// wrapper.eq(Verify::getCode, code);
// //改焊口焊前数据
// Integer verifyCount = verifyMapper.selectCount(wrapper);
// if (verifyCount == 焊前效验数量) {
// wrapper.eq(Verify::getStatus, VerifyEnum.已通过.getStatus());
// //该焊口焊前效验通过数据
// Integer integer = verifyMapper.selectCount(wrapper);
// //判断前三次已经入库
// if (integer == 焊前效验数量) {
// //获取效验接口
// Boolean i = false;
//
//
// verify.setProjectId(jsonObject.getLong("projectId"));
// verify.setCode(jsonObject.getString("code"));
// verify.setTargetInfo(jsonObject.getString("target_info"));
// verify.setSubmitTime(new Date());
// verify.setStage(StageEnum.焊接工艺.getStage());
// if (i) {
// verify.setStatus(VerifyEnum.已通过.getStatus());
// //添加筛选条件
// LambdaQueryWrapper<Weld> wrapperWeld = new LambdaQueryWrapper<>();
// wrapperWeld.eq(Weld::getCode, jsonObject.getString("code"));
// Weld weld = weldMapper.selectOne(wrapperWeld);
// weld.setSuperInspecStatus(StageEnum.焊接工艺.getStage());
//
// weldService.updateById(weld);
//
// 效验状态 = "已通过";
// this.save(verify);
// } else {
// int math= (int) (Math.random()*10000);
// verify.setStatus(VerifyEnum.未通过.getStatus());
// this.save(verify);
// LambdaQueryWrapper<Verify> wrapperVerify=new LambdaQueryWrapper<>();
// wrapperVerify.eq(Verify::getCode,jsonObject.getString("code"));
// wrapperVerify.eq(Verify::getStage,StageEnum.焊接工艺.getStage());
// Verify verifyId = verifyMapper.selectOne(wrapperVerify);
// QualityProblem qualityProblem = new QualityProblem();
// //生成问题编码
// qualityProblem.setStageVerifyId(verifyId.getSequenceNbr());
// qualityProblem.setCode(jsonObject.getString("code")+问题编码+math);
// qualityProblem.setProjectId(jsonObject.getLong("projectId"));
// qualityProblem.setGenerateStage(StageEnum.焊接工艺.getStage());
// qualityProblem.setSubmitDate(new Date());
// qualityProblemService.save(qualityProblem);
// 效验状态 = "未通过";
//
// }
//
// }
//
//
//
// }
//
return
effect
(
jsonObject
,
焊前效验数量
,
true
);
}
/**
* 管道耐压效验
*/
private
final
Integer
管道耐压前效验数量
=
4
;
public
String
materialEffect
(
JSONObject
jsonObject
){
// Verify verify = new Verify();
// //添加筛选条件
// LambdaQueryWrapper<Verify> wrapper = new LambdaQueryWrapper<>();
// //筛选出本焊口监检数
// wrapper.eq(Verify::getCode, jsonObject.getString("code"));
// //该焊口焊前数据
// Integer verifyCount = verifyMapper.selectCount(wrapper);
// if (verifyCount == 管道耐压前效验数量) {
// wrapper.eq(Verify::getStatus, VerifyEnum.已通过.getStatus());
// //该焊口焊前效验通过数据
// Integer integer = verifyMapper.selectCount(wrapper);
// //判断前四次已经入库
// if (integer == 管道耐压前效验数量) {
// //获取效验接口
// Boolean i = true;
//
//
// verify.setProjectId(jsonObject.getLong("projectId"));
// verify.setCode(jsonObject.getString("code"));
// verify.setTargetInfo(jsonObject.getString("target_info"));
// verify.setSubmitTime(new Date());
// verify.setStage(StageEnum.焊前管材质量.getStage());
// if (i) {
// verify.setStatus(VerifyEnum.已通过.getStatus());
// //添加筛选条件
// LambdaQueryWrapper<Weld> wrapperWeld = new LambdaQueryWrapper<>();
// wrapperWeld.eq(Weld::getCode, jsonObject.getString("code"));
// Weld weld = weldMapper.selectOne(wrapperWeld);
// weld.setSuperInspecStatus(StageEnum.焊前管材质量.getStage());
//
// weldService.updateById(weld);
//
// 效验状态 = "已通过";
// } else {
// int math= (int) (Math.random()*10000);
// verify.setStatus(VerifyEnum.未通过.getStatus());
// this.save(verify);
// LambdaQueryWrapper<Verify> wrapperVerify=new LambdaQueryWrapper<>();
// wrapperVerify.eq(Verify::getCode,jsonObject.getString("code"));
// wrapperVerify.eq(Verify::getStage,StageEnum.焊前管材质量.getStage());
// Verify verifyId = verifyMapper.selectOne(wrapperVerify);
// QualityProblem qualityProblem = new QualityProblem();
// //生成问题编码
// qualityProblem.setStageVerifyId(verifyId.getSequenceNbr());
// qualityProblem.setCode(jsonObject.getString("code")+问题编码+math);
// qualityProblem.setProjectId(jsonObject.getLong("projectId"));
// qualityProblem.setGenerateStage(StageEnum.焊前管材质量.getStage());
// qualityProblem.setSubmitDate(new Date());
// qualityProblemService.save(qualityProblem);
// 效验状态 = "未通过";
//
// }
//
// }
//
// save(verify);
//
// }
//
return
effect
(
jsonObject
,
管道耐压前效验数量
,
true
);
}
/**
* 敷设效验
*/
private
final
Integer
敷设效验数量
=
5
;
public
String
layEffect
(
JSONObject
jsonObject
){
//
// Verify verify = new Verify();
// //添加筛选条件
// LambdaQueryWrapper<Verify> wrapper = new LambdaQueryWrapper<>();
// //筛选出本焊口监检数
// wrapper.eq(Verify::getCode, jsonObject.getString("code"));
// //该焊口焊前数据
// Integer verifyCount = verifyMapper.selectCount(wrapper);
// if (verifyCount == 管道耐压前效验数量) {
// wrapper.eq(Verify::getStatus, VerifyEnum.已通过.getStatus());
// //该焊口焊前效验通过数据
// Integer integer = verifyMapper.selectCount(wrapper);
// //判断前四次已经入库
// if (integer == 管道耐压前效验数量) {
// //获取效验接口
// Boolean i = true;
//
//
// verify.setProjectId(jsonObject.getLong("projectId"));
// verify.setCode(jsonObject.getString("code"));
// verify.setTargetInfo(jsonObject.getString("target_info"));
// verify.setSubmitTime(new Date());
// verify.setStage(StageEnum.敷设质量.getStage());
// if (i) {
// verify.setStatus(VerifyEnum.已通过.getStatus());
// //添加筛选条件
// LambdaQueryWrapper<Weld> wrapperWeld = new LambdaQueryWrapper<>();
// wrapperWeld.eq(Weld::getCode, jsonObject.getString("code"));
// Weld weld = weldMapper.selectOne(wrapperWeld);
// weld.setSuperInspecStatus(StageEnum.敷设质量.getStage());
//
// weldService.updateById(weld);
//
// 效验状态 = "已通过";
// } else {
// int math= (int) (Math.random()*10000);
// verify.setStatus(VerifyEnum.未通过.getStatus());
// this.save(verify);
// LambdaQueryWrapper<Verify> wrapperVerify=new LambdaQueryWrapper<>();
// wrapperVerify.eq(Verify::getCode,jsonObject.getString("code"));
// wrapperVerify.eq(Verify::getStage,StageEnum.敷设质量.getStage());
// Verify verifyId = verifyMapper.selectOne(wrapperVerify);
// QualityProblem qualityProblem = new QualityProblem();
// //生成问题编码
// qualityProblem.setStageVerifyId(verifyId.getSequenceNbr());
// qualityProblem.setCode(jsonObject.getString("code")+问题编码+math);
// qualityProblem.setProjectId(jsonObject.getLong("projectId"));
// qualityProblem.setGenerateStage(StageEnum.敷设质量.getStage());
// qualityProblem.setSubmitDate(new Date());
// qualityProblemService.save(qualityProblem);
// 效验状态 = "未通过";
//
// }
//
// }
//
// save(verify);
//
// }
return
effect
(
jsonObject
,
敷设效验数量
,
false
);
}
/**
* 主键id查询
* 主键id查询 (图片和结果)
* @param sequenceNbr
* @return
*/
public
OpenDto
selectById
(
Long
sequenceNbr
){
Verify
verify
=
verifyMapper
.
selectById
(
sequenceNbr
);
...
...
@@ -1357,8 +759,6 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
openDto
.
setResult
(
VerifyEnum
.
已通过
.
getName
());
}
//符合性
openDto
.
setAccord
(
"符合"
);
//有效性
...
...
@@ -1367,106 +767,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
return
openDto
;
}
/**
* 评价
* @return
*/
private
static
final
String
CONFORM
=
"符合"
;
private
static
final
String
NOTCONFORM
=
"不符合"
;
public
Boolean
evaluate
(
JSONObject
jsonObject
)
{
MyPqr
pqr
=
new
MyPqr
(
);
MyWps
wps
=
new
MyWps
(
);
// 初始化
Boolean
flag
=
false
;
HashMap
<
String
,
String
>
stringStringHashMap
=
null
;
String
stage
=
jsonObject
.
getString
(
"stage"
);
if
(!
StringUtils
.
isEmpty
(
stage
))
{
pqr
.
setWelding_method
(
jsonObject
.
getString
(
"pqr_welding_method"
));
pqr
.
setMaterial_a_number
(
jsonObject
.
getString
(
"pqr_material_a_number"
));
pqr
.
setMaterial_a_class
(
jsonObject
.
getString
(
"pqr_material_a_class"
));
pqr
.
setMaterial_a_thickness
(
jsonObject
.
getDouble
(
"pqr_material_a_thickness"
));
pqr
.
setMaterial_a_group
(
jsonObject
.
getString
(
"pqr_material_a_group"
));
pqr
.
setMaterial_a_standard
(
jsonObject
.
getString
(
"pqr_material_a_standard"
));
pqr
.
setMaterial_b_number
(
jsonObject
.
getString
(
"pqr_material_b_number"
));
pqr
.
setMaterial_b_class
(
jsonObject
.
getString
(
"pqr_material_b_class"
));
pqr
.
setMaterial_b_thickness
(
jsonObject
.
getDouble
(
"pqr_material_b_thickness"
));
pqr
.
setMaterial_b_group
(
jsonObject
.
getString
(
"pqr_material_b_group"
));
pqr
.
setMaterial_b_standard
(
jsonObject
.
getString
(
"pqr_material_b_standard"
));
pqr
.
setIf_shock
(
jsonObject
.
getString
(
"pqr_if_shock"
));
pqr
.
setIf_bend
(
jsonObject
.
getString
(
"pqr_if_bend"
));
pqr
.
setGtaw_weld_material_class
(
jsonObject
.
getString
(
"pqr_gtaw_weld_material_class"
));
pqr
.
setSmaw_weld_material_class
(
jsonObject
.
getString
(
"pqr_smaw_weld_material_class"
));
pqr
.
setSaw_weld_material_class_1
(
jsonObject
.
getString
(
"pqr_saw_weld_material_class_1"
));
pqr
.
setSaw_weld_material_class_2
(
jsonObject
.
getString
(
"pqr_saw_weld_material_class_2"
));
pqr
.
setGmaw_weld_material_class
(
jsonObject
.
getString
(
"pqr_gmaw_weld_material_class"
));
pqr
.
setIf_heat_treatment
(
jsonObject
.
getString
(
"pqr_if_heat_treatment"
));
pqr
.
setTemperature
(
jsonObject
.
getDouble
(
"pqr_temperature"
));
pqr
.
setCombox_type
(
jsonObject
.
getString
(
"pqr_combox_type"
));
pqr
.
setTemperature_time
(
jsonObject
.
getDouble
(
"pqr_temperature_time"
));
pqr
.
setMaterial_minT_of_a_b_thickness
(
jsonObject
.
getDouble
(
"pqr_material_minT_of_a_b_thickness"
));
wps
.
setWelding_method
(
jsonObject
.
getString
(
"wps_welding_method"
));
wps
.
setMaterial_a_number
(
jsonObject
.
getString
(
"wps_material_a_number"
));
wps
.
setMaterial_a_class
(
jsonObject
.
getString
(
"wps_material_a_class"
));
wps
.
setMaterial_a_thickness
(
jsonObject
.
getDouble
(
"wps_material_a_thickness"
));
wps
.
setMaterial_a_group
(
jsonObject
.
getString
(
"wps_material_a_group"
));
wps
.
setMaterial_a_standard
(
jsonObject
.
getString
(
"wps_material_a_standard"
));
wps
.
setMaterial_b_number
(
jsonObject
.
getString
(
"wps_material_b_number"
));
wps
.
setMaterial_b_class
(
jsonObject
.
getString
(
"wps_material_b_class"
));
wps
.
setMaterial_b_thickness
(
jsonObject
.
getDouble
(
"wps_material_b_thickness"
));
wps
.
setMaterial_b_group
(
jsonObject
.
getString
(
"wps_material_b_group"
));
wps
.
setMaterial_b_standard
(
jsonObject
.
getString
(
"wps_material_b_standard"
));
wps
.
setIf_shock
(
jsonObject
.
getString
(
"wps_if_shock"
));
wps
.
setIf_bend
(
jsonObject
.
getString
(
"wps_if_bend"
));
wps
.
setGtaw_weld_material_class
(
jsonObject
.
getString
(
"wps_gtaw_weld_material_class"
));
wps
.
setSmaw_weld_material_class
(
jsonObject
.
getString
(
"wps_smaw_weld_material_class"
));
wps
.
setSaw_weld_material_class_1
(
jsonObject
.
getString
(
"wps_saw_weld_material_class_1"
));
wps
.
setSaw_weld_material_class_2
(
jsonObject
.
getString
(
"wps_saw_weld_material_class_2"
));
wps
.
setGmaw_weld_material_class
(
jsonObject
.
getString
(
"wps_gmaw_weld_material_class"
));
wps
.
setIf_heat_treatment
(
jsonObject
.
getString
(
"wps_if_heat_treatment"
));
wps
.
setTemperature
(
jsonObject
.
getDouble
(
"wps_temperature"
));
wps
.
setCombox_type
(
jsonObject
.
getString
(
"wps_combox_type"
));
wps
.
setTemperature_time
(
jsonObject
.
getDouble
(
"wps_temperature_time"
));
wps
.
setMaterial_minT_of_a_b_thickness
(
jsonObject
.
getDouble
(
"wps_material_minT_of_a_b_thickness"
));
}
stringStringHashMap
=
new
WeldingQualification
(
).
equipmentWeldingQualification
(
pqr
,
wps
);
ArrayList
<
String
>
list
=
new
ArrayList
<>(
);
for
(
String
key:
stringStringHashMap
.
keySet
()){
String
vaule
=
stringStringHashMap
.
get
(
key
);
//如果不是空串
if
(
vaule
!=
null
&&!
vaule
.
equals
(
""
))
{
list
.
add
(
vaule
);
}
}
// 获取不符合的
List
<
String
>
notconform
=
list
.
stream
(
).
filter
(
b
->
b
.
equals
(
NOTCONFORM
)).
collect
(
Collectors
.
toList
(
));
if
(
notconform
==
null
&&
notconform
.
size
()==
0
)
{
//没有不符合的,更改状态
flag
=
true
;
}
return
flag
;
}
...
...
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