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
a9a15a0c
Commit
a9a15a0c
authored
Mar 16, 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
59fe1185
7408439b
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
190 additions
and
105 deletions
+190
-105
OrgUsrMapper.java
...join/amos/boot/module/common/api/mapper/OrgUsrMapper.java
+3
-3
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+9
-7
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+4
-4
application.properties
...-module-tzs-biz/src/main/resources/application.properties
+4
-2
InformationDto.java
.../yeejoin/amos/boot/module/ugp/api/dto/InformationDto.java
+6
-4
EquipmentMapper.java
...join/amos/boot/module/ugp/api/mapper/EquipmentMapper.java
+2
-4
EquipmentMapper.xml
...ule-ugp-api/src/main/resources/mapper/EquipmentMapper.xml
+8
-21
ProblemCodeLibController.java
...t/module/ugp/biz/controller/ProblemCodeLibController.java
+36
-0
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+49
-4
EquipmentServiceImpl.java
...oot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
+9
-9
ProblemInitiationServiceImpl.java
...le/ugp/biz/service/impl/ProblemInitiationServiceImpl.java
+1
-0
ProjectServiceImpl.java
.../boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
+33
-27
WelderServiceImpl.java
...s/boot/module/ugp/biz/service/impl/WelderServiceImpl.java
+26
-20
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/OrgUsrMapper.java
View file @
a9a15a0c
...
...
@@ -124,10 +124,10 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
List
<
OrgUsr
>
selectPersonListByCompanyIdList
(
@Param
(
"companyIdList"
)
List
<
String
>
companyIdList
);
Page
<
OrgUsr
>
getWelderByProjectId
(
@Param
(
"page"
)
Page
<
OrgUsr
>
page
,
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
nam
e
);
Page
<
Map
<
String
,
Object
>>
getWelderByProjectId
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
,
@Param
(
"type"
)
String
typ
e
);
Page
<
OrgUsr
>
getAllListByProjectId
(
@Param
(
"page"
)
Page
<
OrgUsr
>
page
,
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
Page
<
Map
<
String
,
Object
>>
getAllListByProjectId
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>
>
page
,
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
List
<
OrgUsr
>
getWelderListByProjectId
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
List
<
Map
<
String
,
Object
>
>
getWelderListByProjectId
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
a9a15a0c
...
...
@@ -881,14 +881,16 @@ LEFT JOIN (
#{companyId}
</foreach>
);
</select>
<select
id=
"getWelderByProjectId"
resultType=
"
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
"
>
<select
id=
"getWelderByProjectId"
resultType=
"
java.util.Map
"
>
SELECT
cou.
*
cou.
sequence_nbr as sequenceNbr,ifNUll(upr.status, 0) as suatus
FROM
cb_org_usr cou
LEFT JOIN tz_ugp_project_resource upr ON cou.sequence_nbr = upr.resource_id
<where>
upr.type = 'welder' AND upr.project_id = #{projectId}
<if
test=
"type != null and type != ''"
>
and upr.type = 'welder' AND upr.project_id = #{projectId}
</if>
AND cou.parent_id = #{companyId}
<if
test=
"name != null and name != ''"
>
and cou.biz_org_name like concat('%', #{name}, '%')
...
...
@@ -897,9 +899,9 @@ LEFT JOIN (
</select>
<select
id=
"getAllListByProjectId"
resultType=
"
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
"
>
<select
id=
"getAllListByProjectId"
resultType=
"
java.util.Map
"
>
SELECT
cou.
*
cou.
sequence_nbr as sequenceNbr,ifNUll(upr.status, 0) as suatus
FROM
cb_org_usr cou
LEFT JOIN tz_ugp_project_resource upr ON cou.sequence_nbr = upr.resource_id
...
...
@@ -912,9 +914,9 @@ LEFT JOIN (
</where>
</select>
<select
id=
"getWelderListByProjectId"
resultType=
"
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
"
>
<select
id=
"getWelderListByProjectId"
resultType=
"
java.util.Map
"
>
SELECT
cou.
*
cou.
sequence_nbr as sequenceNbr,ifNUll(upr.status, 0) as suatus
FROM
cb_org_usr cou
LEFT JOIN tz_ugp_project_resource upr ON cou.sequence_nbr = upr.resource_id
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
a9a15a0c
...
...
@@ -2478,15 +2478,15 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return
this
.
baseMapper
.
selectList
(
wrapper
).
stream
().
collect
(
Collectors
.
toList
());
}
public
Page
<
OrgUsr
>
getWelderByProjectId
(
Page
<
OrgUsr
>
page
,
String
projectId
,
Long
companyId
,
String
nam
e
)
{
return
this
.
baseMapper
.
getWelderByProjectId
(
page
,
projectId
,
companyId
,
name
);
public
Page
<
Map
<
String
,
Object
>>
getWelderByProjectId
(
Page
<
Map
<
String
,
Object
>>
page
,
String
projectId
,
Long
companyId
,
String
name
,
String
typ
e
)
{
return
this
.
baseMapper
.
getWelderByProjectId
(
page
,
projectId
,
companyId
,
name
,
type
);
}
public
Page
<
OrgUsr
>
getAllListByProjectId
(
Page
<
OrgUsr
>
page
,
String
projectId
,
Long
companyId
,
String
name
)
{
public
Page
<
Map
<
String
,
Object
>>
getAllListByProjectId
(
Page
<
Map
<
String
,
Object
>
>
page
,
String
projectId
,
Long
companyId
,
String
name
)
{
return
this
.
baseMapper
.
getAllListByProjectId
(
page
,
projectId
,
companyId
,
name
);
}
public
List
<
OrgUsr
>
getWelderListByProjectId
(
String
projectId
,
Long
companyId
,
String
name
)
{
public
List
<
Map
<
String
,
Object
>
>
getWelderListByProjectId
(
String
projectId
,
Long
companyId
,
String
name
)
{
return
this
.
baseMapper
.
getWelderListByProjectId
(
projectId
,
companyId
,
name
);
}
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/resources/application.properties
View file @
a9a15a0c
spring.application.name
=
TZS
-Cpp
spring.application.name
=
TZS
server.servlet.context-path
=
/tzs
server.port
=
1100
2
server.port
=
1100
0
spring.profiles.active
=
dev3
spring.jackson.time-zone
=
GMT+8
...
...
@@ -51,6 +51,8 @@ supervision.feign.name = AMOS-SUPERVISION-API
security.systemctl.name
=
AMOS-API-SYSTEMCTL
privilege.fegin.name
=
AMOS-API-PRIVILEGE
jcs.company.topic.add
=
jcs/company/topic/add
jcs.company.topic.delete
=
jcs/company/topic/delete
## �豸�����������š��㲥�����壩
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/InformationDto.java
View file @
a9a15a0c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.Data
;
...
...
@@ -8,11 +9,12 @@ import java.util.Map;
@Data
public
class
InformationDto
{
private
List
<
Map
<
String
,
Object
>>
equipmentList
;
private
List
<
Map
<
String
,
Object
>>
welderList
;
private
List
<
Map
<
String
,
Object
>>
materialList
;
private
List
<
Map
<
String
,
Object
>>
equipmentList
;
private
List
<
Map
<
String
,
Object
>>
welderList
;
private
List
<
Map
<
String
,
Object
>>
materialList
;
private
List
<
Map
<
String
,
Object
>>
fileList
;
private
JSONObject
fileJson
;
private
JSONArray
subFormInstall
;
private
JSONArray
subFormAttachment
;
private
Long
projectId
;
private
String
type
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/EquipmentMapper.java
View file @
a9a15a0c
...
...
@@ -24,10 +24,8 @@ public interface EquipmentMapper extends BaseMapper<Equipment> {
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
nam
e
);
Page
<
Map
<
String
,
Object
>>
boundWelder
(
@Param
(
"page"
)
IPage
<
Map
<
String
,
Object
>>
page
,
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
,
@Param
(
"type"
)
String
typ
e
);
Page
<
EquipmentDto
>
allBoundWelder
(
@Param
(
"page"
)
IPage
<
EquipmentDto
>
page
,
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
List
<
EquipmentDto
>
boundWelderList
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"companyId"
)
Long
companyId
,
@Param
(
"name"
)
String
name
);
List
<
Map
<
String
,
Object
>>
boundWelderList
(
@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 @
a9a15a0c
...
...
@@ -37,40 +37,27 @@
</where>
GROUP BY type
</select>
<select
id=
"boundWelder"
resultType=
"
com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto
"
>
<select
id=
"boundWelder"
resultType=
"
java.util.Map
"
>
SELECT
ue.*
ue.*
, ifnull(upr.status, 1) as status
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}, '%')
ue.company_id = #{companyId}
<if
test=
"type != null and type != ''"
>
and upr.type = 'equipment' AND upr.project_id = #{projectId}
</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>
<select
id=
"boundWelderList"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto"
>
<select
id=
"boundWelderList"
resultType=
"java.util.Map"
>
SELECT
ue.*
ue.*
, ifnull(upr.status, 1) as status
FROM
tz_ugp_equipment ue
LEFT JOIN tz_ugp_project_resource upr ON ue.sequence_nbr = upr.resource_id
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProblemCodeLibController.java
View file @
a9a15a0c
...
...
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FailureDetailsServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProblemCodeLibDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProblemCodeLib
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProblemCodeLibService
;
...
...
@@ -16,18 +18,26 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import
com.yeejoin.amos.feign.privilege.model.ApplicationModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
feign.Response
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.io.IOUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -48,6 +58,13 @@ public class ProblemCodeLibController extends BaseController {
@Resource
private
IProblemCodeLibService
problemCodeLibService
;
@Autowired
FailureDetailsServiceImpl
failureDetailsServiceImpl
;
@Autowired
WorkflowFeignService
workflowFeignService
;
/**
* 新增质量监检信息表
*/
...
...
@@ -172,4 +189,23 @@ public class ProblemCodeLibController extends BaseController {
List
<
DictionarieValueModel
>
result
=
adminCommonlyUsed
.
getResult
();
return
ResponseHelper
.
buildResponse
(
result
);
}
/**
* 参考JCS服务流程图信息
* @param instanceId 流程实例ID
* @return 流程图
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getInstanceImage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"流程图高亮图片"
,
notes
=
"流程图高亮图片"
)
public
ResponseEntity
<
String
>
downloadFile
(
@RequestParam
String
instanceId
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Response
feignResponse
=
workflowFeignService
.
thighLineImg
(
instanceId
);
try
{
Response
.
Body
body
=
feignResponse
.
body
();
return
new
ResponseEntity
<>(
IOUtils
.
toString
(
body
.
asInputStream
()),
HttpStatus
.
OK
);
}
catch
(
Exception
e
)
{
throw
new
BaseException
(
"Error exporting diagram"
,
"500"
,
instanceId
);
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
a9a15a0c
...
...
@@ -453,16 +453,61 @@ public class ProjectController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"资料提交/保存"
,
notes
=
"资料提交/保存"
)
@PostMapping
(
value
=
"/informationSaveOrUpdate"
)
public
ResponseModel
<
Object
>
informationSaveOrUpdate
(
@RequestBody
InformationDto
dto
){
projectServiceImpl
.
informationSaveOrUpdate
(
dto
.
getEquipmentList
(),
dto
.
getWelderList
(),
dto
.
getMaterialList
(),
dto
.
getFileJson
(),
dto
.
getProjectId
(),
dto
.
getType
());
public
ResponseModel
<
Object
>
informationSaveOrUpdate
(
@RequestBody
JSONObject
object
)
{
InformationDto
dto
=
new
InformationDto
();
dto
.
setProjectId
(
Long
.
valueOf
(
String
.
valueOf
(
object
.
get
(
"projectId"
))));
Map
<
String
,
Object
>
map
=
JSON
.
parseObject
(
object
.
toString
());
List
<
Map
<
String
,
Object
>>
welderList
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"welderList"
);
if
(!
ObjectUtils
.
isEmpty
(
welderList
))
{
dto
.
setWelderList
(
welderList
);
}
List
<
Map
<
String
,
Object
>>
materialList
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"materialList"
);
if
(!
ObjectUtils
.
isEmpty
(
materialList
))
{
dto
.
setMaterialList
(
materialList
);
}
List
<
Map
<
String
,
Object
>>
equipmentList
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"equipmentList"
);
if
(!
ObjectUtils
.
isEmpty
(
equipmentList
))
{
dto
.
setEquipmentList
(
equipmentList
);
}
List
<
Map
<
String
,
Object
>>
fileList
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"fileList"
);
if
(!
ObjectUtils
.
isEmpty
(
fileList
))
{
dto
.
setFileList
(
fileList
);
}
dto
.
setType
(
String
.
valueOf
(
object
.
get
(
"type"
)));
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"designSubForm"
,
object
.
get
(
"designSubForm"
));
jsonObject
.
put
(
"installSubForm"
,
object
.
get
(
"installSubForm"
));
projectServiceImpl
.
informationSaveOrUpdate
(
dto
.
getEquipmentList
(),
dto
.
getWelderList
(),
dto
.
getMaterialList
(),
jsonObject
,
dto
.
getProjectId
(),
dto
.
getType
());
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"资料保存、审核"
,
notes
=
"资料保存、审核"
)
@PostMapping
(
value
=
"/informationAudit"
)
public
ResponseModel
<
Object
>
informationAudit
(
@RequestBody
InformationDto
dto
){
projectServiceImpl
.
informationAudit
(
dto
.
getEquipmentList
(),
dto
.
getWelderList
(),
dto
.
getMaterialList
(),
dto
.
getFileList
(),
dto
.
getProjectId
(),
dto
.
getType
());
public
ResponseModel
<
Object
>
informationAudit
(
@RequestBody
JSONObject
object
)
{
InformationDto
dto
=
new
InformationDto
();
dto
.
setProjectId
(
Long
.
valueOf
(
String
.
valueOf
(
object
.
get
(
"projectId"
))));
Map
<
String
,
Object
>
map
=
JSON
.
parseObject
(
object
.
toString
());
List
<
Map
<
String
,
Object
>>
welderList
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"welderList"
);
if
(!
ObjectUtils
.
isEmpty
(
welderList
))
{
dto
.
setWelderList
(
welderList
);
}
List
<
Map
<
String
,
Object
>>
materialList
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"materialList"
);
if
(!
ObjectUtils
.
isEmpty
(
materialList
))
{
dto
.
setMaterialList
(
materialList
);
}
List
<
Map
<
String
,
Object
>>
equipmentList
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"equipmentList"
);
if
(!
ObjectUtils
.
isEmpty
(
equipmentList
))
{
dto
.
setEquipmentList
(
equipmentList
);
}
List
<
Map
<
String
,
Object
>>
fileList
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"fileList"
);
if
(!
ObjectUtils
.
isEmpty
(
fileList
))
{
dto
.
setFileList
(
fileList
);
}
projectServiceImpl
.
informationAudit
(
dto
.
getEquipmentList
(),
dto
.
getWelderList
(),
dto
.
getMaterialList
(),
dto
.
getFileList
(),
dto
.
getProjectId
(),
dto
.
getType
());
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
...
...
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 @
a9a15a0c
...
...
@@ -289,26 +289,26 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
@BusinessIdentify
public
Page
<
EquipmentDto
>
boundWelder
(
String
projectId
,
Integer
current
,
Integer
size
,
String
name
,
String
type
)
{
public
Page
<
Map
<
String
,
Object
>
>
boundWelder
(
String
projectId
,
Integer
current
,
Integer
size
,
String
name
,
String
type
)
{
ReginParams
reginParams
=
orgService
.
getReginParams
();
Long
companySequenceNbr
=
reginParams
.
getBusinessInfo
().
getCompanySequenceNbr
();
if
(!
ObjectUtils
.
isEmpty
(
current
)
||
!
ObjectUtils
.
isEmpty
(
size
))
{
Page
<
EquipmentDto
>
result
;
Page
<
EquipmentDto
>
page
=
new
Page
<>(
current
,
size
);
Page
<
Map
<
String
,
Object
>
>
result
;
Page
<
Map
<
String
,
Object
>
>
page
=
new
Page
<>(
current
,
size
);
if
(!
ObjectUtils
.
isEmpty
(
type
)
&&
"all"
.
equals
(
type
))
{
result
=
equipmentMapper
.
allBoundWelder
(
page
,
projectId
,
companySequenceNbr
,
name
);
result
=
equipmentMapper
.
boundWelder
(
page
,
projectId
,
companySequenceNbr
,
name
,
null
);
}
else
{
result
=
equipmentMapper
.
boundWelder
(
page
,
projectId
,
companySequenceNbr
,
name
);
result
=
equipmentMapper
.
boundWelder
(
page
,
projectId
,
companySequenceNbr
,
name
,
"bound"
);
}
result
.
getRecords
().
forEach
(
item
->
{
List
<
JSONObject
>
files
=
attachmentServiceImpl
.
getFilesBySourceId
(
item
.
getSequenceNbr
(
));
item
.
setFiles
(
files
);
List
<
JSONObject
>
files
=
attachmentServiceImpl
.
getFilesBySourceId
(
Long
.
valueOf
(
String
.
valueOf
(
item
.
get
(
"sequence_nbr"
))
));
item
.
put
(
"files"
,
files
);
});
return
result
;
}
else
{
// 不分页时返回全部、定制组件格式统一
Page
<
EquipmentDto
>
listPage
=
new
Page
<>();
List
<
EquipmentDto
>
equipmentDtos
=
equipmentMapper
.
boundWelderList
(
projectId
,
companySequenceNbr
,
name
);
Page
<
Map
<
String
,
Object
>
>
listPage
=
new
Page
<>();
List
<
Map
<
String
,
Object
>
>
equipmentDtos
=
equipmentMapper
.
boundWelderList
(
projectId
,
companySequenceNbr
,
name
);
listPage
.
setRecords
(
equipmentDtos
);
return
listPage
;
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProblemInitiationServiceImpl.java
View file @
a9a15a0c
...
...
@@ -513,6 +513,7 @@ public class ProblemInitiationServiceImpl {
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto1
);
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
}
Workflow
.
activitiHistoryClient
// 更新问题状态
if
(!
ObjectUtils
.
isEmpty
(
dataObject
)
&&
!
ObjectUtils
.
isEmpty
(
dataObject
.
get
(
"name"
))){
if
(
ManualProcessingEnum
.
问题录入
.
getName
().
equals
(
dataObject
.
get
(
"name"
))
||
ManualProcessingEnum
.
问题自动录入
.
getName
().
equals
(
dataObject
.
get
(
"name"
))){
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
View file @
a9a15a0c
...
...
@@ -772,35 +772,41 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
ArrayList
<
ProjectResource
>
projectResources
=
new
ArrayList
<>();
// 焊机信息
equipmentList
.
forEach
(
item
->
{
ProjectResource
projectResource
=
new
ProjectResource
();
projectResource
.
setProjectId
(
projectId
);
projectResource
.
setResourceId
(
Long
.
valueOf
(
String
.
valueOf
(
item
.
get
(
"sequenceNbr"
))));
projectResource
.
setType
(
"equipment"
);
projectResource
.
setName
(
String
.
valueOf
(
item
.
get
(
"name"
)));
projectResource
.
setStatus
(
ObjectUtils
.
isEmpty
(
item
.
get
(
status
))
?
"0"
:
String
.
valueOf
(
item
.
get
(
status
)));
projectResources
.
add
(
projectResource
);
});
if
(!
ObjectUtils
.
isEmpty
(
equipmentList
))
{
equipmentList
.
forEach
(
item
->
{
ProjectResource
projectResource
=
new
ProjectResource
();
projectResource
.
setProjectId
(
projectId
);
projectResource
.
setResourceId
(
Long
.
valueOf
(
String
.
valueOf
(
item
.
get
(
"sequenceNbr"
))));
projectResource
.
setType
(
"equipment"
);
projectResource
.
setName
(
String
.
valueOf
(
item
.
get
(
"name"
)));
projectResource
.
setStatus
(
ObjectUtils
.
isEmpty
(
item
.
get
(
status
))
?
"0"
:
String
.
valueOf
(
item
.
get
(
status
)));
projectResources
.
add
(
projectResource
);
});
}
// 焊工信息
welderList
.
forEach
(
item
->
{
ProjectResource
projectResource
=
new
ProjectResource
();
projectResource
.
setProjectId
(
projectId
);
projectResource
.
setResourceId
(
Long
.
valueOf
(
String
.
valueOf
(
item
.
get
(
"sequenceNbr"
))));
projectResource
.
setType
(
"welder"
);
projectResource
.
setName
(
String
.
valueOf
(
item
.
get
(
"name"
)));
projectResource
.
setStatus
(
ObjectUtils
.
isEmpty
(
item
.
get
(
status
))
?
"0"
:
String
.
valueOf
(
item
.
get
(
status
)));
projectResources
.
add
(
projectResource
);
});
if
(!
ObjectUtils
.
isEmpty
(
welderList
))
{
welderList
.
forEach
(
item
->
{
ProjectResource
projectResource
=
new
ProjectResource
();
projectResource
.
setProjectId
(
projectId
);
projectResource
.
setResourceId
(
Long
.
valueOf
(
String
.
valueOf
(
item
.
get
(
"sequenceNbr"
))));
projectResource
.
setType
(
"welder"
);
projectResource
.
setName
(
String
.
valueOf
(
item
.
get
(
"name"
)));
projectResource
.
setStatus
(
ObjectUtils
.
isEmpty
(
item
.
get
(
status
))
?
"0"
:
String
.
valueOf
(
item
.
get
(
status
)));
projectResources
.
add
(
projectResource
);
});
}
// 管材信息
materialList
.
forEach
(
item
->
{
ProjectResource
projectResource
=
new
ProjectResource
();
projectResource
.
setProjectId
(
projectId
);
projectResource
.
setResourceId
(
Long
.
valueOf
(
String
.
valueOf
(
item
.
get
(
"sequenceNbr"
))));
projectResource
.
setType
(
"material"
);
projectResource
.
setName
(
String
.
valueOf
(
item
.
get
(
"name"
)));
projectResource
.
setStatus
(
ObjectUtils
.
isEmpty
(
item
.
get
(
status
))
?
"0"
:
String
.
valueOf
(
item
.
get
(
status
)));
projectResources
.
add
(
projectResource
);
});
if
(!
ObjectUtils
.
isEmpty
(
materialList
))
{
materialList
.
forEach
(
item
->
{
ProjectResource
projectResource
=
new
ProjectResource
();
projectResource
.
setProjectId
(
projectId
);
projectResource
.
setResourceId
(
Long
.
valueOf
(
String
.
valueOf
(
item
.
get
(
"sequenceNbr"
))));
projectResource
.
setType
(
"material"
);
projectResource
.
setName
(
String
.
valueOf
(
item
.
get
(
"name"
)));
projectResource
.
setStatus
(
ObjectUtils
.
isEmpty
(
item
.
get
(
status
))
?
"0"
:
String
.
valueOf
(
item
.
get
(
status
)));
projectResources
.
add
(
projectResource
);
});
}
LambdaQueryWrapper
<
ProjectResource
>
lambda
=
new
QueryWrapper
<
ProjectResource
>().
lambda
();
lambda
.
eq
(
ProjectResource:
:
getProjectId
,
projectId
);
projectResourceMapper
.
delete
(
lambda
);
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/WelderServiceImpl.java
View file @
a9a15a0c
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
...
...
@@ -220,45 +221,50 @@ public class WelderServiceImpl {
public
Page
<
Map
<
String
,
Object
>>
getWelderByProjectId
(
String
projectId
,
Integer
current
,
Integer
size
,
String
name
,
String
type
)
{
String
columnKey
=
"column"
;
String
valueKey
=
"value"
;
String
sequenceNbrKey
=
"sequenceNbr"
;
String
statusKey
=
"status"
;
Page
<
Map
<
String
,
Object
>>
mapPage
=
new
Page
<>();
ArrayList
<
Map
<
String
,
Object
>>
maps
=
new
ArrayList
<>();
ReginParams
reginParams
=
orgService
.
getReginParams
();
Long
companySequenceNbr
=
reginParams
.
getBusinessInfo
().
getCompanySequenceNbr
();
List
<
OrgUsr
>
usr
List
;
List
<
Map
<
String
,
Object
>>
map
List
;
// 分页参数为空时返回全部
if
(!
ObjectUtils
.
isEmpty
(
current
)
||
!
ObjectUtils
.
isEmpty
(
size
))
{
Page
<
OrgUsr
>
page
=
new
Page
<>(
current
,
size
);
Page
<
Map
<
String
,
Object
>
>
page
=
new
Page
<>(
current
,
size
);
if
(!
ObjectUtils
.
isEmpty
(
type
)
&&
"all"
.
equals
(
type
))
{
page
=
orgUsrService
.
get
AllListByProjectId
(
page
,
projectId
,
companySequenceNbr
,
name
);
page
=
orgUsrService
.
get
WelderByProjectId
(
page
,
projectId
,
companySequenceNbr
,
name
,
null
);
}
else
{
page
=
orgUsrService
.
getWelderByProjectId
(
page
,
projectId
,
companySequenceNbr
,
name
);
page
=
orgUsrService
.
getWelderByProjectId
(
page
,
projectId
,
companySequenceNbr
,
name
,
"bound"
);
}
mapPage
.
setTotal
(
page
.
getTotal
());
mapPage
.
setSize
(
page
.
getSize
());
mapPage
.
setPages
(
page
.
getPages
());
usr
List
=
page
.
getRecords
();
map
List
=
page
.
getRecords
();
}
else
{
usr
List
=
orgUsrService
.
getWelderListByProjectId
(
projectId
,
companySequenceNbr
,
name
);
map
List
=
orgUsrService
.
getWelderListByProjectId
(
projectId
,
companySequenceNbr
,
name
);
}
usr
List
.
forEach
(
item
->
{
map
List
.
forEach
(
item
->
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"status"
,
"1"
);
map
.
put
(
"sequenceNbr"
,
item
.
getSequenceNbr
());
List
<
Map
<
String
,
Object
>>
message
=
alertFormValueServiceImpl
.
getMessageMapByInstanceId
(
String
.
valueOf
(
item
.
getSequenceNbr
()));
message
.
forEach
(
dataItem
->
{
if
(
String
.
valueOf
(
dataItem
.
get
(
columnKey
)).
equals
(
"image"
)
&&
!
ObjectUtils
.
isEmpty
(
dataItem
.
get
(
columnKey
))
&&
!
ObjectUtils
.
isEmpty
(
dataItem
.
get
(
valueKey
)))
{
String
value1
=
String
.
valueOf
(
dataItem
.
get
(
valueKey
));
List
<
Map
<
String
,
Object
>>
imageMap
=
(
List
<
Map
<
String
,
Object
>>)
JSON
.
parse
(
value1
);
if
(!
ObjectUtils
.
isEmpty
(
imageMap
))
{
map
.
put
(
"files"
,
imageMap
);
map
.
put
(
statusKey
,
item
.
getOrDefault
(
statusKey
,
1
));
if
(!
ObjectUtils
.
isEmpty
(
item
.
get
(
sequenceNbrKey
)))
{
map
.
put
(
sequenceNbrKey
,
item
.
get
(
sequenceNbrKey
));
List
<
Map
<
String
,
Object
>>
message
=
alertFormValueServiceImpl
.
getMessageMapByInstanceId
(
String
.
valueOf
(
item
.
get
(
sequenceNbrKey
)));
message
.
forEach
(
dataItem
->
{
if
(
String
.
valueOf
(
dataItem
.
get
(
columnKey
)).
equals
(
"image"
)
&&
!
ObjectUtils
.
isEmpty
(
dataItem
.
get
(
columnKey
))
&&
!
ObjectUtils
.
isEmpty
(
dataItem
.
get
(
valueKey
)))
{
String
value1
=
String
.
valueOf
(
dataItem
.
get
(
valueKey
));
List
<
Map
<
String
,
Object
>>
imageMap
=
(
List
<
Map
<
String
,
Object
>>)
JSON
.
parse
(
value1
);
if
(!
ObjectUtils
.
isEmpty
(
imageMap
))
{
map
.
put
(
"files"
,
imageMap
);
}
}
}
map
.
put
(
String
.
valueOf
(
dataItem
.
get
(
columnKey
)),
dataItem
.
get
(
valueKey
)
);
}
);
maps
.
add
(
map
);
map
.
put
(
String
.
valueOf
(
dataItem
.
get
(
columnKey
)),
dataItem
.
get
(
valueKey
));
}
);
maps
.
add
(
map
);
}
});
mapPage
.
setRecords
(
maps
);
return
mapPage
;
}
...
...
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