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
4678325d
Commit
4678325d
authored
Oct 14, 2022
by
srx
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
4654253e
4d6ad98c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
14 deletions
+51
-14
EquipmentController.java
...s/boot/module/ugp/biz/controller/EquipmentController.java
+2
-2
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+7
-1
WelderController.java
...amos/boot/module/ugp/biz/controller/WelderController.java
+18
-3
EquipmentServiceImpl.java
...oot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
+16
-5
OrgServiceImpl.java
...amos/boot/module/ugp/biz/service/impl/OrgServiceImpl.java
+5
-1
ProjectResourceServiceImpl.java
...dule/ugp/biz/service/impl/ProjectResourceServiceImpl.java
+3
-2
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/EquipmentController.java
View file @
4678325d
...
...
@@ -143,8 +143,8 @@ public class EquipmentController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备数据名称查询"
,
notes
=
"设备数据名称查询"
)
@GetMapping
(
value
=
"/selectName"
)
public
ResponseModel
<
List
<
JSONObject
>>
selectName
(
@RequestParam
(
value
=
"
unitId"
)
String
installationUnitId
)
{
return
ResponseHelper
.
buildResponse
(
equipmentServiceImpl
.
selectName
(
installationUnitId
));
public
ResponseModel
<
List
<
JSONObject
>>
selectName
(
@RequestParam
(
value
=
"
code"
)
String
code
)
{
return
ResponseHelper
.
buildResponse
(
equipmentServiceImpl
.
selectName
(
code
));
}
/**
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
4678325d
...
...
@@ -14,9 +14,11 @@ import io.swagger.annotations.Api;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectServiceImpl
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -174,8 +176,12 @@ public class ProjectController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前登陆人所在单位下的所以项目列表"
,
notes
=
"查询当前登陆人所在单位下的所以项目列表"
)
@GetMapping
(
value
=
"/getCompanyProjects"
)
public
ResponseModel
<
List
<
Project
>>
getCompanyProjects
(){
Long
companyId
=
orgServiceImpl
.
getCompanyId
();
if
(
ValidationUtil
.
isEmpty
(
companyId
)){
return
ResponseHelper
.
buildResponse
(
new
ArrayList
<>());
}
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Project:
:
getConstructionUnitId
,
orgServiceImpl
.
getCompanyId
()
);
wrapper
.
eq
(
Project:
:
getConstructionUnitId
,
companyId
);
return
ResponseHelper
.
buildResponse
(
projectServiceImpl
.
list
(
wrapper
));
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/WelderController.java
View file @
4678325d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WelderDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.OrgServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -24,6 +27,8 @@ import java.util.stream.Collectors;
public
class
WelderController
extends
BaseController
{
@Autowired
OrgServiceImpl
orgService
;
@Autowired
ProjectMapper
projectMapper
;
/**
...
...
@@ -47,10 +52,20 @@ public class WelderController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectWelder"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新增焊工信息"
,
notes
=
"新增焊工信息"
)
public
ResponseModel
<
List
<
Map
>>
selectWelder
(
@RequestParam
(
"unitId"
)
String
companyId
)
{
List
<
Map
>
info
=
orgService
.
getInfo
(
companyId
);
public
ResponseModel
<
List
<
JSONObject
>>
selectWelder
(
@RequestParam
(
"code"
)
String
code
)
{
List
<
JSONObject
>
jsonObjectList
=
new
ArrayList
<>();
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Project:
:
getCode
,
code
);
Project
project
=
projectMapper
.
selectOne
(
wrapper
);
List
<
Map
>
info
=
orgService
.
getInfo
(
String
.
valueOf
(
project
.
getCompanyId
()));
for
(
Map
<
String
,
Object
>
map:
info
){
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"name"
,
map
.
get
(
"name"
));
jsonObject
.
put
(
"sequenceNbr"
,
map
.
get
(
"sequenceNbr"
));
jsonObjectList
.
add
(
jsonObject
);
}
return
ResponseHelper
.
buildResponse
(
info
);
return
ResponseHelper
.
buildResponse
(
jsonObjectList
);
}
}
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 @
4678325d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Equipment
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.EquipmentMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IEquipmentService
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -31,6 +34,8 @@ import java.util.stream.Collectors;
public
class
EquipmentServiceImpl
extends
BaseService
<
EquipmentDto
,
Equipment
,
EquipmentMapper
>
implements
IEquipmentService
{
@Autowired
EquipmentMapper
equipmentMapper
;
@Autowired
ProjectMapper
projectMapper
;
@Autowired
AttachmentServiceImpl
attachmentServiceImpl
;
...
...
@@ -57,13 +62,19 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
*
* @return
*/
public
List
<
JSONObject
>
selectName
(
String
installationUnitId
)
{
public
List
<
JSONObject
>
selectName
(
String
code
)
{
List
<
JSONObject
>
names
=
new
ArrayList
<>();
//添加查询条件
QueryWrapper
<
Equipment
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
"company_id"
,
installationUnitId
);
List
<
Equipment
>
equipment
=
equipmentMapper
.
selectList
(
wrapper
);
// QueryWrapper<Equipment> wrapper = new QueryWrapper<>();
// wrapper.eq("company_id", installationUnitId);
//获取项目的安装单位id
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Project:
:
getCode
,
code
);
Project
project
=
projectMapper
.
selectOne
(
wrapper
);
//获取项目的安装单位id进行查询
QueryWrapper
<
Equipment
>
wrapperEquipment
=
new
QueryWrapper
<>();
wrapperEquipment
.
eq
(
"company_id"
,
project
.
getInstallationUnitId
());
List
<
Equipment
>
equipment
=
equipmentMapper
.
selectList
(
wrapperEquipment
);
for
(
Equipment
i
:
equipment
)
{
JSONObject
name
=
new
JSONObject
();
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/OrgServiceImpl.java
View file @
4678325d
...
...
@@ -239,6 +239,10 @@ public class OrgServiceImpl {
public
Long
getCompanyId
(){
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
OrgUsr
::
getAmosOrgId
,
String
.
valueOf
(
getReginParams
().
getCompany
().
getSequenceNbr
()));
return
orgUsrServiceImpl
.
getOne
(
wrapper
).
getSequenceNbr
();
OrgUsr
orgUsr
=
orgUsrServiceImpl
.
getOne
(
wrapper
);
if
(
ValidationUtil
.
isEmpty
(
orgUsr
)){
return
null
;
}
return
orgUsr
.
getSequenceNbr
();
}
}
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 @
4678325d
...
...
@@ -130,8 +130,9 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
// if (!jsonObject.getString("sequenceNbr").isEmpty()){
// jsonObject.getString("sequenceNbr");
// }
String
SequenceNbr
=
jsonObject
.
getString
(
"SequenceNbr"
);
Long
SequenceNbr
=
Long
.
valueOf
(
jsonObject
.
getString
(
"sequenceNbr"
)
);
String
type
=
jsonObject
.
getString
(
"type"
);
//判断资源类型并插入
if
(
type
.
equals
(
设备资源
.
getStatus
()))
{
projectResource
.
setType
(
设备资源
.
getState
());
}
...
...
@@ -141,7 +142,7 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
if
(
type
.
equals
(
管材资源
.
getStatus
()))
{
projectResource
.
setType
(
管材资源
.
getState
());
}
projectResource
.
setProjectId
(
Long
.
valueOf
(
SequenceNbr
)
);
projectResource
.
setProjectId
(
SequenceNbr
);
projectResource
.
setResourceId
(
Long
.
valueOf
(
select
));
this
.
save
(
projectResource
);
...
...
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