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
eee2c7b6
Commit
eee2c7b6
authored
Dec 01, 2022
by
曹盼盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
焊口修复接口,已经焊口修复弹窗接口
parent
bbcaeda2
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
307 additions
and
0 deletions
+307
-0
CodeWeldDto.java
...com/yeejoin/amos/boot/module/ugp/api/dto/CodeWeldDto.java
+16
-0
VerifyMapper.java
...yeejoin/amos/boot/module/ugp/api/mapper/VerifyMapper.java
+4
-0
WeldMapper.java
...m/yeejoin/amos/boot/module/ugp/api/mapper/WeldMapper.java
+4
-0
VerifyMapper.xml
...module-ugp-api/src/main/resources/mapper/VerifyMapper.xml
+35
-0
VerifyController.java
...amos/boot/module/ugp/biz/controller/VerifyController.java
+30
-0
VerifyServiceImpl.java
...s/boot/module/ugp/biz/service/impl/VerifyServiceImpl.java
+218
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/CodeWeldDto.java
0 → 100644
View file @
eee2c7b6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @Author cpp
* @Description
* @Date 2022/12/1
*/
@Data
public
class
CodeWeldDto
{
private
String
code
;
private
Date
date
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/VerifyMapper.java
View file @
eee2c7b6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.CodeWeldDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.SmartListDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.SmartListDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Verify
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Verify
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
@@ -31,6 +33,8 @@ public interface VerifyMapper extends BaseMapper<Verify> {
...
@@ -31,6 +33,8 @@ public interface VerifyMapper extends BaseMapper<Verify> {
//
//
List
<
Verify
>
selectByWelder
(
Long
projectId
,
Long
welderId
,
String
code
,
String
stage
,
Long
random
);
List
<
Verify
>
selectByWelder
(
Long
projectId
,
Long
welderId
,
String
code
,
String
stage
,
Long
random
);
Verify
selectByCode
(
String
code
,
Long
projectId
,
String
stage
,
Long
random
);
Verify
selectByCode
(
String
code
,
Long
projectId
,
String
stage
,
Long
random
);
List
<
CodeWeldDto
>
getCode
();
List
<
Verify
>
getVerity
(
String
code
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/WeldMapper.java
View file @
eee2c7b6
...
@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto;
...
@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Weld
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Weld
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -27,4 +28,7 @@ public interface WeldMapper extends BaseMapper<Weld> {
...
@@ -27,4 +28,7 @@ public interface WeldMapper extends BaseMapper<Weld> {
IPage
<
WeldDto
>
queryForWeldPage
(
IPage
<
WeldDto
>
page
,
Set
<
String
>
codes
,
@RequestBody
(
required
=
false
)
WeldDto
weldDto
)
;
IPage
<
WeldDto
>
queryForWeldPage
(
IPage
<
WeldDto
>
page
,
Set
<
String
>
codes
,
@RequestBody
(
required
=
false
)
WeldDto
weldDto
)
;
@Select
(
"select * from tz_ugp_weld where `code` =#{code}"
)
WeldDto
getSqe
(
@Param
(
"code"
)
String
code
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/VerifyMapper.xml
View file @
eee2c7b6
...
@@ -111,4 +111,39 @@
...
@@ -111,4 +111,39 @@
target_info -> "$.random" =#{random}
target_info -> "$.random" =#{random}
</if>
</if>
</select>
</select>
<select
id=
"getCode"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.CodeWeldDto"
>
select
`code`,
MAX(verify_time) AS `date`
from
tz_ugp_verify
where
`status`='0'
AND
stage ='CRAFT' or stage ='VOLTAGE' or stage ='LAY' or stage ='LOTCATION' or stage ='BACKFILL'
GROUP BY `code`
</select>
<select
id=
"getVerity"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.entity.Verify"
>
select
sequence_nbr,
project_id,
`code`,
stage,
target_info,
`status`,
type,
submit_time,
verify_time,
verify_unit_id,
charger_person_id,
inspector_id
from tz_ugp_verify where stage='CRAFT'
AND
`code`=#{code}
</select>
</mapper>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/VerifyController.java
View file @
eee2c7b6
...
@@ -447,6 +447,36 @@ public class VerifyController extends BaseController {
...
@@ -447,6 +447,36 @@ public class VerifyController extends BaseController {
return
ResponseHelper
.
buildResponse
(
objectPage1
);
return
ResponseHelper
.
buildResponse
(
objectPage1
);
}
}
/**
*
焊口修复
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"焊口修复"
,
notes
=
"焊口修复"
)
@GetMapping
(
value
=
"/repair"
)
public
ResponseModel
<
Page
<
WeldDto
>>
repair
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
WeldDto
weldDto
)
{
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
repair
(
current
,
size
,
weldDto
));
}
/**
*
焊口修复弹窗
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"焊口修复弹窗"
,
notes
=
"焊口修复弹窗"
)
@GetMapping
(
value
=
"/fixedPopovers"
)
public
ResponseModel
<
Page
<
TableDto
>>
fixedPopovers
(
@RequestParam
String
code
)
{
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
fixedPopovers
(
code
));
}
}
}
...
...
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 @
eee2c7b6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.*
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.*
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.*
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.*
;
...
@@ -39,6 +41,8 @@ import java.util.*;
...
@@ -39,6 +41,8 @@ import java.util.*;
import
java.util.List
;
import
java.util.List
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
org
.
springframework
.
data
.
elasticsearch
.
annotations
.
DateFormat
.
year
;
import
static
org
.
springframework
.
data
.
elasticsearch
.
annotations
.
DateFormat
.
year
;
...
@@ -96,6 +100,8 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -96,6 +100,8 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
@Autowired
@Autowired
private
ProblemInitiationServiceImpl
problemInitiationService
;
private
ProblemInitiationServiceImpl
problemInitiationService
;
@Autowired
private
CompanyServiceImpl
companyService
;
/**
/**
* 分页查询
* 分页查询
...
@@ -990,4 +996,216 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -990,4 +996,216 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
return
jsonArray
;
return
jsonArray
;
}
}
//焊口修复 (焊口信息 弹窗工艺信息)
public
Page
<
WeldDto
>
repair
(
Integer
current
,
Integer
size
,
WeldDto
weldDto
){
Page
<
WeldDto
>
objectPage1
=
new
Page
<>(
);
List
<
CodeWeldDto
>
codeList
=
verifyMapper
.
getCode
(
);
Page
<
Weld
>
objectPage
=
new
Page
<>(
);
objectPage
.
setCurrent
(
current
);
objectPage
.
setSize
(
size
);
ArrayList
<
WeldDto
>
list
=
Lists
.
newArrayList
(
);
codeList
.
forEach
(
code
->{
WeldDto
weldDto1
=
weldMapper
.
getSqe
(
code
.
getCode
(
));
list
.
add
(
weldDto1
);
});
//分页
List
<
WeldDto
>
collect
=
list
.
stream
(
).
skip
((
current
-
1
)
*
size
).
limit
(
size
).
collect
(
Collectors
.
toList
(
));
ArrayList
<
WeldDto
>
list1
=
Lists
.
newArrayList
(
);
collect
.
forEach
(
c
->{
ProjectDto
projectDto
=
projectServiceImpl
.
queryBySeq
(
c
.
getProjectId
(
));
c
.
setName
(
projectDto
.
getName
());
c
.
setRegion
(
projectDto
.
getAddress
());
c
.
setCodingStatus
(
WeldCodeEnum
.
map
.
get
(
c
.
getCodingStatus
()));
c
.
setCodingMethod
(
WeldMethodEnum
.
map
.
get
(
c
.
getCodingMethod
()));
CompanyDto
companyDto
=
companyService
.
queryBySeq
(
c
.
getInstallCompany
(
));
c
.
setInstallationUnit
(
companyDto
.
getName
());
list1
.
add
(
c
);
});
objectPage1
.
setRecords
(
list1
);
List
<
WeldDto
>
list2
=
null
;
List
<
WeldDto
>
list3
=
null
;
List
<
WeldDto
>
list4
=
null
;
if
(
weldDto
!=
null
)
{
if
(!
ValidationUtil
.
isEmpty
(
weldDto
.
getName
()))
{
list2
=
list1
.
stream
(
).
filter
(
weldDto1
->
weldDto1
.
getName
(
).
contains
(
weldDto
.
getName
(
))).
collect
(
Collectors
.
toList
(
));
}
if
(!
ValidationUtil
.
isEmpty
(
weldDto
.
getInstallationUnit
())
)
{
list3
=
list1
.
stream
(
).
filter
(
weldDto1
->
weldDto1
.
getInstallationUnit
().
contains
(
weldDto
.
getInstallationUnit
())).
collect
(
Collectors
.
toList
(
));
}
if
(!
ValidationUtil
.
isEmpty
(
weldDto
.
getName
())
&&
!
ValidationUtil
.
isEmpty
(
weldDto
.
getInstallationUnit
()))
{
list4
=
list2
.
stream
(
).
filter
(
weldDto1
->
weldDto1
.
getInstallationUnit
().
contains
(
weldDto
.
getInstallationUnit
())).
collect
(
Collectors
.
toList
(
));
}
if
(!
ValidationUtil
.
isEmpty
(
weldDto
.
getName
()))
{
objectPage1
.
setRecords
(
list2
);
}
if
(!
ValidationUtil
.
isEmpty
(
weldDto
.
getInstallationUnit
()))
{
objectPage1
.
setRecords
(
list3
);
}
if
(!
ValidationUtil
.
isEmpty
(
weldDto
.
getName
())
&&
!
ValidationUtil
.
isEmpty
(
weldDto
.
getInstallationUnit
()))
{
objectPage1
.
setRecords
(
list4
);
}
}
objectPage1
.
setCurrent
(
current
);
objectPage1
.
setSize
(
size
);
return
objectPage1
;
}
//焊口修复弹窗
public
Page
<
TableDto
>
fixedPopovers
(
String
code
)
{
List
<
Verify
>
verity
=
null
;
if
(!
ValidationUtil
.
isEmpty
(
code
))
{
verity
=
verifyMapper
.
getVerity
(
code
);
}
JSONArray
jsonArray
=
new
JSONArray
(
);
int
num
=
0
;
verity
.
forEach
(
v
->
{
ProjectDto
projectDto
=
projectServiceImpl
.
queryBySeq
(
v
.
getProjectId
(
));
JSONObject
object
=
new
JSONObject
(
);
object
.
put
(
"projectName"
,
projectDto
.
getName
());
object
.
put
(
"pCode"
,
projectDto
.
getCode
());
object
.
put
(
"code"
,
v
.
getCode
());
String
targetInfo
=
v
.
getTargetInfo
(
);
JSONObject
info
=
JSONObject
.
parseObject
(
targetInfo
);
Long
weldingId
=
info
.
getLong
(
"weldingId"
);
if
(
weldingId
!=
null
)
{
EquipmentDto
equipmentDto
=
equipmentService
.
queryBySeq
(
weldingId
);
if
(
equipmentDto
!=
null
)
{
object
.
put
(
"eCode"
,
equipmentDto
.
getCode
());
}
}
object
.
put
(
"carft"
,
info
.
getString
(
"craft"
));
object
.
put
(
"duration"
,
info
.
getString
(
"duration"
));
object
.
put
(
"location"
,
info
.
getString
(
"location"
));
String
status
=
v
.
getStatus
(
);
if
(
status
.
equals
(
VerifyEnum
.
已通过
.
getStatus
()))
{
object
.
put
(
"status"
,
VerifyEnum
.
已通过
.
getName
());
}
else
if
(
status
.
equals
(
VerifyEnum
.
未通过
.
getStatus
()))
{
object
.
put
(
"status"
,
VerifyEnum
.
未通过
.
getName
());
}
object
.
put
(
"type"
,
TYPE
);
object
.
put
(
"submitTime"
,
v
.
getSubmitTime
());
object
.
put
(
"verifyTime"
,
v
.
getVerifyTime
());
object
.
put
(
_id
,
num
+
1
);
jsonArray
.
add
(
object
);
});
//非逻辑,页面格式
String
js
=
JSONObject
.
toJSONString
(
jsonArray
,
SerializerFeature
.
WriteClassName
);
List
<
JSONObject
>
list
=
JSONObject
.
parseArray
(
js
,
JSONObject
.
class
);
TableDto
tableDto
=
new
TableDto
(
);
DataGridMock
dataGridMock
=
new
DataGridMock
(
);
dataGridMock
.
setDataList
(
list
);
dataGridMock
.
setTotal
(
list
.
size
());
ColModel
colModel1
=
new
ColModel
(
);
colModel1
.
setFid
(
"projectName"
);
colModel1
.
setDataIndex
(
"projectName"
);
colModel1
.
setName
(
"项目名称"
);
colModel1
.
setTitle
(
"项目名称"
);
colModel1
.
setType
(
"dataGrid"
);
colModel1
.
setKey
(
"projectName"
);
ColModel
colModel2
=
new
ColModel
(
);
colModel2
.
setFid
(
"pCode"
);
colModel2
.
setDataIndex
(
"pCode"
);
colModel2
.
setName
(
"项目编号"
);
colModel2
.
setTitle
(
"项目编号"
);
colModel2
.
setType
(
"dataGrid"
);
colModel2
.
setKey
(
"pCode"
);
ColModel
colModel3
=
new
ColModel
(
);
colModel3
.
setFid
(
"code"
);
colModel3
.
setDataIndex
(
"code"
);
colModel3
.
setName
(
"焊口编号"
);
colModel3
.
setTitle
(
"焊口编号"
);
colModel3
.
setType
(
"dataGrid"
);
colModel3
.
setKey
(
"code"
);
ColModel
colModel4
=
new
ColModel
(
);
colModel4
.
setFid
(
"carft"
);
colModel4
.
setDataIndex
(
"carft"
);
colModel4
.
setName
(
"焊接工艺"
);
colModel4
.
setTitle
(
"焊接工艺"
);
colModel4
.
setType
(
"dataGrid"
);
colModel4
.
setKey
(
"carft"
);
ColModel
colModel5
=
new
ColModel
(
);
colModel5
.
setFid
(
"eCode"
);
colModel5
.
setDataIndex
(
"eCode"
);
colModel5
.
setName
(
"焊机编号"
);
colModel5
.
setTitle
(
"焊机编号"
);
colModel5
.
setType
(
"dataGrid"
);
colModel5
.
setKey
(
"eCode"
);
ColModel
colModel6
=
new
ColModel
(
);
colModel6
.
setFid
(
"duration"
);
colModel6
.
setDataIndex
(
"duration"
);
colModel6
.
setName
(
"焊接时长"
);
colModel6
.
setTitle
(
"焊接时长"
);
colModel6
.
setType
(
"dataGrid"
);
colModel6
.
setKey
(
"duration"
);
ColModel
colModel7
=
new
ColModel
(
);
colModel7
.
setFid
(
"location"
);
colModel7
.
setDataIndex
(
"location"
);
colModel7
.
setName
(
"焊接定位信息"
);
colModel7
.
setTitle
(
"焊接定位信息"
);
colModel7
.
setType
(
"dataGrid"
);
colModel7
.
setKey
(
"location"
);
ColModel
colModel8
=
new
ColModel
(
);
colModel8
.
setFid
(
"status"
);
colModel8
.
setDataIndex
(
"status"
);
colModel8
.
setName
(
"检验状态"
);
colModel8
.
setTitle
(
"检验状态"
);
colModel8
.
setType
(
"dataGrid"
);
colModel8
.
setKey
(
"status"
);
ColModel
colModel9
=
new
ColModel
(
);
colModel9
.
setFid
(
"type"
);
colModel9
.
setDataIndex
(
"type"
);
colModel9
.
setName
(
"检验方式"
);
colModel9
.
setTitle
(
"检验方式"
);
colModel9
.
setType
(
"dataGrid"
);
colModel9
.
setKey
(
"type"
);
ColModel
colModel10
=
new
ColModel
(
);
colModel10
.
setFid
(
"type"
);
colModel10
.
setDataIndex
(
"type"
);
colModel10
.
setName
(
"检验方式"
);
colModel10
.
setTitle
(
"检验方式"
);
colModel10
.
setType
(
"dataGrid"
);
colModel10
.
setKey
(
"type"
);
ColModel
colModel11
=
new
ColModel
(
);
colModel11
.
setFid
(
"submitTime"
);
colModel11
.
setDataIndex
(
"submitTime"
);
colModel11
.
setName
(
"交检日期"
);
colModel11
.
setTitle
(
"交检日期"
);
colModel11
.
setType
(
"dataGrid"
);
colModel11
.
setKey
(
"submitTime"
);
ColModel
colModel12
=
new
ColModel
(
);
colModel12
.
setFid
(
"verifyTime"
);
colModel12
.
setDataIndex
(
"verifyTime"
);
colModel12
.
setName
(
"检验时间"
);
colModel12
.
setTitle
(
"检验时间"
);
colModel12
.
setType
(
"dataGrid"
);
colModel12
.
setKey
(
"verifyTime"
);
ArrayList
<
ColModel
>
list1
=
Lists
.
newArrayList
(
);
list1
.
add
(
colModel1
);
list1
.
add
(
colModel2
);
list1
.
add
(
colModel3
);
list1
.
add
(
colModel4
);
list1
.
add
(
colModel5
);
list1
.
add
(
colModel6
);
list1
.
add
(
colModel7
);
list1
.
add
(
colModel8
);
list1
.
add
(
colModel9
);
list1
.
add
(
colModel10
);
list1
.
add
(
colModel11
);
list1
.
add
(
colModel12
);
tableDto
.
setDataGridMock
(
dataGridMock
);
tableDto
.
setColModel
(
list1
);
ArrayList
<
TableDto
>
list2
=
Lists
.
newArrayList
(
);
list2
.
add
(
tableDto
);
Page
<
TableDto
>
objectPage1
=
new
Page
<>(
);
objectPage1
.
setRecords
(
list2
);
return
objectPage1
;
}
}
}
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