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
cfad4cb1
Commit
cfad4cb1
authored
Nov 03, 2022
by
wanglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 焊口信息,项目设备列表,项目管材列表
parent
9440bb1b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
89 additions
and
3 deletions
+89
-3
ProjectResourceController.java
.../module/ugp/biz/controller/ProjectResourceController.java
+29
-2
WeldController.java
...n/amos/boot/module/ugp/biz/controller/WeldController.java
+12
-0
ProjectResourceServiceImpl.java
...dule/ugp/biz/service/impl/ProjectResourceServiceImpl.java
+35
-1
WeldServiceImpl.java
...mos/boot/module/ugp/biz/service/impl/WeldServiceImpl.java
+13
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectResourceController.java
View file @
cfad4cb1
...
...
@@ -184,16 +184,43 @@ public class ProjectResourceController extends BaseController {
}
/**
* 绑定
设备跟项目
* 绑定
项目所用到的设备管材
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"绑定
设备跟项目"
,
notes
=
"绑定设备跟项目
"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"绑定
项目所用到的设备管材"
,
notes
=
"绑定项目所用到的设备管材
"
)
@PostMapping
(
value
=
"/saveId"
)
public
ResponseModel
<
ProjectResource
>
saveId
(
@RequestBody
JSONObject
jsonObject
)
{
return
ResponseHelper
.
buildResponse
(
projectResourceServiceImpl
.
saveIds
(
jsonObject
));
}
/**
* 根据项目id获取项目使用到的设备
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/projectEquipment"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据项目id获取项目使用到的设备"
,
notes
=
"根据项目id获取项目使用到的设备"
)
public
ResponseModel
<
List
<
ProjectResource
>>
projectEquipment
(
@RequestParam
String
projectId
){
return
ResponseHelper
.
buildResponse
(
projectResourceServiceImpl
.
getProjectEquipment
(
projectId
));
}
/**
* 根据项目ID获取项目使用到的管材
* @param projectId
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/projectMaterial"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据项目ID获取项目使用到的管材"
,
notes
=
"根据项目ID获取项目使用到的管材"
)
public
ResponseModel
<
List
<
ProjectResource
>>
projectMaterial
(
@RequestParam
String
projectId
){
return
ResponseHelper
.
buildResponse
(
projectResourceServiceImpl
.
getProjectMaterial
(
projectId
));
}
/**
* 项目管材分页列表,根据名称、编号查询
*/
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/WeldController.java
View file @
cfad4cb1
...
...
@@ -107,6 +107,18 @@ public class WeldController extends BaseController {
}
/**
* 根据焊口编码获取焊口信息
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/getWeldInfo"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据焊口编码获取焊口信息"
,
notes
=
"根据焊口编码获取焊口信息"
)
public
ResponseModel
<
Weld
>
getWeldInfo
(
@RequestParam
String
code
){
return
ResponseHelper
.
buildResponse
(
weldServiceImpl
.
getWeldInfo
(
code
));
}
/**
* 更新焊口编码任务状态
* @return
*/
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectResourceServiceImpl.java
View file @
cfad4cb1
...
...
@@ -136,7 +136,7 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
}
/**
*
存储项目设备关系
*
绑定项目所用到的设备管材
*/
public
ProjectResource
saveIds
(
JSONObject
jsonObject
)
{
JSONArray
subForm
=
jsonObject
.
getJSONArray
(
"subForm"
);
...
...
@@ -173,6 +173,40 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
/**
* 根据项目id获取项目使用到的设备
* @param projectId
* @return
*/
public
List
<
ProjectResource
>
getProjectEquipment
(
String
projectId
){
return
getProjectResources
(
projectId
,
设备资源
);
}
/**
* 根据项目ID获取项目使用到的管材
* @param projectId
* @return
*/
public
List
<
ProjectResource
>
getProjectMaterial
(
String
projectId
){
return
getProjectResources
(
projectId
,
管材资源
);
}
/**
* 根据项目id获取项目公共接口
* @param projectId
* @param 资源
* @return
*/
private
List
<
ProjectResource
>
getProjectResources
(
String
projectId
,
ProjectResourceEnum
资源
)
{
LambdaQueryWrapper
<
ProjectResource
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
ProjectResource:
:
getProjectId
,
projectId
);
wrapper
.
eq
(
ProjectResource:
:
getType
,
资源
.
getCode
());
List
<
ProjectResource
>
projectResources
=
projectResourceMapper
.
selectList
(
wrapper
);
return
projectResources
;
}
/**
* 获取当前登录人所在单位下的所有项目列表
* @return
*/
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/WeldServiceImpl.java
View file @
cfad4cb1
...
...
@@ -14,8 +14,10 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.WeldMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IWeldService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.ArrayList
;
...
...
@@ -170,6 +172,17 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements
return
welds
;
}
/**
* 根据焊口编码获取焊口信息
*/
public
Weld
getWeldInfo
(
String
code
){
LambdaQueryWrapper
<
Weld
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
Weld
>
eq
=
wrapper
.
eq
(
Weld:
:
getCode
,
code
);
Weld
weld
=
weldMapper
.
selectOne
(
eq
);
return
weld
;
}
/**
* 通过项目id获取数据
* @param projectId
...
...
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