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
a78f2cd6
Commit
a78f2cd6
authored
Mar 10, 2023
by
zhangyingbin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
7b2f182b
1f3e7511
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
0 deletions
+81
-0
EquipmentMapper.java
...join/amos/boot/module/ugp/api/mapper/EquipmentMapper.java
+5
-0
EquipmentMapper.xml
...ule-ugp-api/src/main/resources/mapper/EquipmentMapper.xml
+32
-0
EquipmentController.java
...s/boot/module/ugp/biz/controller/EquipmentController.java
+26
-0
EquipmentServiceImpl.java
...oot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
+18
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/EquipmentMapper.java
View file @
a78f2cd6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Equipment
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
...
@@ -22,4 +23,8 @@ public interface EquipmentMapper extends BaseMapper<Equipment> {
IPage
<
EquipmentDto
>
queryEquipmentPage
(
IPage
<
EquipmentDto
>
page
,
Equipment
equipment
,
Set
<
String
>
companyIds
);
List
<
Map
<
String
,
Long
>>
informationStatistics
(
@Param
(
"companyIds"
)
Set
<
String
>
companyIds
);
Page
<
EquipmentDto
>
boundWelder
(
@Param
(
"page"
)
IPage
<
EquipmentDto
>
page
,
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
Page
<
EquipmentDto
>
allBoundWelder
(
@Param
(
"page"
)
IPage
<
EquipmentDto
>
page
,
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/EquipmentMapper.xml
View file @
a78f2cd6
...
...
@@ -37,5 +37,37 @@
</where>
GROUP BY type
</select>
<select
id=
"boundWelder"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto"
>
SELECT
ue.*
FROM
tz_ugp_equipment ue
LEFT JOIN tz_ugp_project_resource upr ON ue.sequence_nbr = upr.resource_id
<where>
upr.type = 'equipment' AND upr.project_id = #{projectId}
AND ue.company_id = #{companyId}
<if
test=
"name != null and name != ''"
>
and ue.name like concat('%', #{name}, '%')
</if>
</where>
</select>
<select
id=
"allBoundWelder"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto"
>
SELECT
ue.*
FROM
tz_ugp_equipment ue
LEFT JOIN tz_ugp_project_resource upr ON ue.sequence_nbr = upr.resource_id
<where>
( (upr.project_id = #{projectId} and upr.type = 'equipment' ) or upr.resource_id is null)
AND ue.company_id = #{companyId}
<if
test=
"name != null and name != ''"
>
and ue.name like concat('%', #{name}, '%')
</if>
</where>
</select>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/EquipmentController.java
View file @
a78f2cd6
...
...
@@ -285,4 +285,30 @@ public class EquipmentController extends BaseController {
public
ResponseModel
<
List
<
Map
<
String
,
Long
>>>
informationStatistics
()
{
return
ResponseHelper
.
buildResponse
(
equipmentServiceImpl
.
informationStatistics
());
}
/**
* 查询已绑定焊机信息
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/boundWelder"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询已绑定焊机信息"
,
notes
=
"查询已绑定焊机信息"
)
public
ResponseModel
<
Object
>
boundWelder
(
@RequestParam
(
value
=
"projectId"
)
String
projectId
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
)
{
return
ResponseHelper
.
buildResponse
(
equipmentServiceImpl
.
boundWelder
(
projectId
,
current
,
size
,
name
,
null
));
}
/**
* 查询已绑定焊机信息以及空闲设备
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/allBoundWelder"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询已绑定焊机信息"
,
notes
=
"查询已绑定焊机信息"
)
public
ResponseModel
<
Object
>
allBoundWelder
(
@RequestParam
(
value
=
"projectId"
)
String
projectId
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
)
{
return
ResponseHelper
.
buildResponse
(
equipmentServiceImpl
.
boundWelder
(
projectId
,
current
,
size
,
name
,
"all"
));
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
View file @
a78f2cd6
...
...
@@ -20,12 +20,14 @@ import com.yeejoin.amos.boot.module.ugp.api.service.IEquipmentService;
import
com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* 设备信息表服务实现类
...
...
@@ -285,4 +287,19 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
return
equipmentMapper
.
informationStatistics
(
companyIds
);
}
@BusinessIdentify
public
Page
<
EquipmentDto
>
boundWelder
(
String
projectId
,
int
current
,
int
size
,
String
name
,
String
type
)
{
ReginParams
reginParams
=
orgService
.
getReginParams
();
Long
companySequenceNbr
=
reginParams
.
getBusinessInfo
().
getCompanySequenceNbr
();
Page
<
EquipmentDto
>
page
=
new
Page
<>(
current
,
size
);
Page
<
EquipmentDto
>
result
;
if
(!
ObjectUtils
.
isEmpty
(
type
)
&&
"all"
.
equals
(
type
))
{
result
=
equipmentMapper
.
boundWelder
(
page
,
projectId
,
companySequenceNbr
,
name
);
}
else
{
result
=
equipmentMapper
.
allBoundWelder
(
page
,
projectId
,
companySequenceNbr
,
name
);
}
return
result
;
}
}
\ No newline at end of file
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