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
f55256b0
Commit
f55256b0
authored
Nov 24, 2022
by
曹盼盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加耐压假数据
parent
8dee2924
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
20 deletions
+53
-20
VerifyMapper.java
...yeejoin/amos/boot/module/ugp/api/mapper/VerifyMapper.java
+2
-1
VerifyController.java
...amos/boot/module/ugp/biz/controller/VerifyController.java
+7
-2
VerifyServiceImpl.java
...s/boot/module/ugp/biz/service/impl/VerifyServiceImpl.java
+44
-17
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/VerifyMapper.java
View file @
f55256b0
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.SmartListDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Verify
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
...
@@ -23,7 +24,7 @@ public interface VerifyMapper extends BaseMapper<Verify> {
* @return
*/
List
<
Verify
>
commonality
(
String
stage
,
SmartListDto
smartListDto
,
List
listId
);
Page
<
Verify
>
commonality
(
Page
<
Verify
>
page
,
String
stage
,
SmartListDto
smartListDto
,
List
listId
);
@Select
(
"select * from tz_ugp_verify where target_info = #{targetInfo}"
)
Verify
selectByTargetInfo
(
String
targetInfo
);
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/VerifyController.java
View file @
f55256b0
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.sun.org.apache.bcel.internal.generic.NEW
;
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
;
...
...
@@ -304,8 +306,11 @@ public class VerifyController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/lookWeld"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"耐压所属焊口查看"
,
notes
=
"耐压所属焊口查看"
)
public
ResponseModel
<
JSONObject
>
lookWeld
(
@RequestParam
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
getWeldLook
(
sequenceNbr
));
public
ResponseModel
<
Page
<
Object
>>
lookWeld
(
@RequestParam
Long
sequenceNbr
)
{
Page
<
Object
>
objectPage
=
new
Page
<>(
);
JSONArray
dataList
=
verifyServiceImpl
.
getWeldLook
(
sequenceNbr
);
objectPage
.
setRecords
(
dataList
);
return
ResponseHelper
.
buildResponse
(
objectPage
);
}
}
...
...
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 @
f55256b0
...
...
@@ -13,6 +13,7 @@ import com.yeejoin.amos.boot.module.ugp.api.service.IVerifyService;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
jnr.ffi.Struct
;
import
lombok.var
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -120,16 +121,11 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
public
Page
<
SmartListDto
>
commonality
(
String
stage
,
Page
<
SmartListDto
>
page
,
SmartListDto
smartListDto
){
//新加获取项目列表
List
<
Project
>
projectList
=
projectResourceService
.
getProjectList
(
);
List
<
Long
>
listId
=
new
ArrayList
<>(
);
for
(
Project
project
:
projectList
)
{
listId
.
add
(
project
.
getSequenceNbr
());
}
List
<
Verify
>
verifyList
=
null
;
if
(
listId
!=
null
&&
listId
.
size
()>
0
)
{
verifyList
=
verifyMapper
.
commonality
(
stage
,
smartListDto
,
listId
);
}
Page
<
Verify
>
objectPage
=
new
Page
<>(
);
objectPage
.
setCurrent
(
page
.
getCurrent
());
objectPage
.
setSize
(
page
.
getSize
());
Page
<
Verify
>
pageDto
=
verifyMapper
.
commonality
(
objectPage
,
stage
,
smartListDto
,
null
);
List
<
Verify
>
verifyList
=
pageDto
.
getRecords
();
List
<
SmartListDto
>
dtoList
=
new
ArrayList
<>();
//进入焊前
if
(
verifyList
!=
null
&&
verifyList
.
size
()
!=
0
){
...
...
@@ -463,6 +459,36 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
}
//效验通过
this
.
addSuccessData
(
verify
,
null
,
jsonObject
);
/**注意: app那边没有 暂时耐压假数据*/
Verify
v1
=
new
Verify
(
);
JSONObject
object
=
new
JSONObject
(
);
object
.
put
(
"pressureTest"
,
"10Mpa"
);
object
.
put
(
"stage"
,
"耐压"
);
object
.
put
(
"code"
,
code
);
object
.
put
(
"pressureId"
,
1587252459623968770L
);
object
.
put
(
"welderId"
,
welderId
);
object
.
put
(
"photo"
,
"upload/ugp/amos_studio/E47A1E7D1BD4517B20923F108FC03F1.jpg"
);
object
.
put
(
"location"
,
"经纬度"
);
object
.
put
(
"projectId"
,
projectId
);
Calendar
calendar
=
Calendar
.
getInstance
();
String
year
=
String
.
valueOf
(
calendar
.
get
(
Calendar
.
YEAR
));
int
month
=
calendar
.
get
(
Calendar
.
MONTH
)
+
1
;
int
day
=
calendar
.
get
(
Calendar
.
DATE
);
StringBuffer
stringBuffer
=
new
StringBuffer
(
);
stringBuffer
.
append
(
year
).
append
(
month
).
append
(
day
).
append
(
"-"
)
.
append
(
UUID
.
randomUUID
().
toString
().
substring
(
UUID
.
randomUUID
().
toString
().
length
()-
4
));
jsonObject
.
put
(
"pressureNumber"
,
stringBuffer
.
toString
());
String
info
=
object
.
toJSONString
();
v1
.
setTargetInfo
(
info
);
v1
.
setProjectId
(
projectId
);
//项目id
v1
.
setType
(
TYPE
);
//检验方式
v1
.
setVerifyTime
(
time
);
v1
.
setCode
(
code
);
v1
.
setStage
(
StageEnum
.
管道耐压
.
getStage
());
v1
.
setSubmitTime
(
time
);
this
.
addSuccessData
(
v1
,
null
,
object
);
}
//耐压
if
(
stage
.
equals
(
StageEnum
.
管道耐压
.
getVerifyName
())){
...
...
@@ -677,12 +703,12 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
verify
.
setStatus
(
VerifyEnum
.
已通过
.
getStatus
());
try
{
//智能监检管理表添加数据
this
.
save
(
verify
);
this
.
save
(
verify
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
(
);
}
//焊口表修改状态
if
(
codeArray
==
null
||
codeArray
.
length
==
0
)
{
if
(
codeArray
==
null
)
{
String
targetInfo
=
verify
.
getTargetInfo
(
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
targetInfo
);
String
code
=
jsonObject
.
getString
(
"code"
);
//获取焊口编号
...
...
@@ -706,7 +732,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
}
}
}
if
(
codeArray
!=
null
&&
codeArray
.
length
>
0
)
{
if
(
codeArray
!=
null
)
{
for
(
String
code
:
codeArray
)
{
if
(!
ValidationUtil
.
isEmpty
(
code
)&&
verify
.
getProjectId
()
!=
null
)
{
Weld
weld
=
weldMapper
.
getWeldByCodeAndProjectId
(
code
,
verify
.
getProjectId
());
...
...
@@ -847,18 +873,19 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
}
return
oldPhoto
;
}
private
static
final
String
HEGE
=
"合格"
;
private
static
final
String
NOTHEGE
=
"不合格"
;
//耐压所属焊口查看
public
JSON
Object
getWeldLook
(
Long
sequenceNbr
){
public
JSON
Array
getWeldLook
(
Long
sequenceNbr
){
JSONObject
object
=
new
JSONObject
(
);
JSONArray
jsonArray
=
new
JSONArray
(
);
if
(
sequenceNbr
!=
null
)
{
Verify
verify
=
verifyMapper
.
selectById
(
sequenceNbr
);
//耐压信息
if
(
verify
!=
null
)
{
String
codes
=
verify
.
getCode
(
);
if
(!
ValidationUtil
.
isEmpty
(
codes
))
{
String
[]
codeArray
=
codes
.
split
(
","
);
int
num
=
1
;
for
(
String
code
:
codeArray
)
{
//查工艺
object
.
put
(
"code"
,
code
);
...
...
@@ -895,7 +922,6 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
object
.
put
(
"peopleStatus"
,
NOTHEGE
);
}
}
if
(
ve
!=
null
)
{
String
status
=
ve
.
getStatus
();
if
(
VerifyEnum
.
已通过
.
getStatus
().
equals
(
status
))
{
...
...
@@ -915,10 +941,11 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
}
}
}
jsonArray
.
add
(
object
);
}
}
}
}
return
object
;
return
jsonArray
;
}
}
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