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
9b81ca6f
Commit
9b81ca6f
authored
Nov 17, 2022
by
zhengjuzi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
# Conflicts: # amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/VerifyMapper.xml
parents
80cc1813
c72c4ae1
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
271 additions
and
74 deletions
+271
-74
RectifyMsgDto.java
...m/yeejoin/amos/boot/module/ugp/api/dto/RectifyMsgDto.java
+1
-1
AttachmentMapper.java
...oin/amos/boot/module/ugp/api/mapper/AttachmentMapper.java
+3
-0
InstallNoticeMapper.xml
...ugp-api/src/main/resources/mapper/InstallNoticeMapper.xml
+1
-1
ProjectMapper.xml
...odule-ugp-api/src/main/resources/mapper/ProjectMapper.xml
+1
-1
ProjectResourceMapper.xml
...p-api/src/main/resources/mapper/ProjectResourceMapper.xml
+7
-4
QualityProblemMapper.xml
...gp-api/src/main/resources/mapper/QualityProblemMapper.xml
+1
-1
VerifyMapper.xml
...module-ugp-api/src/main/resources/mapper/VerifyMapper.xml
+1
-1
ProjectResourceController.java
.../module/ugp/biz/controller/ProjectResourceController.java
+1
-1
AttachmentServiceImpl.java
...ot/module/ugp/biz/service/impl/AttachmentServiceImpl.java
+15
-0
EquipmentServiceImpl.java
...oot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
+6
-0
InstallNoticeServiceImpl.java
...module/ugp/biz/service/impl/InstallNoticeServiceImpl.java
+5
-0
MaterialServiceImpl.java
...boot/module/ugp/biz/service/impl/MaterialServiceImpl.java
+9
-0
OrgServiceImpl.java
...amos/boot/module/ugp/biz/service/impl/OrgServiceImpl.java
+4
-2
QualityProblemServiceImpl.java
...odule/ugp/biz/service/impl/QualityProblemServiceImpl.java
+16
-3
VerifyServiceImpl.java
...s/boot/module/ugp/biz/service/impl/VerifyServiceImpl.java
+179
-57
WelderServiceImpl.java
...s/boot/module/ugp/biz/service/impl/WelderServiceImpl.java
+21
-2
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/RectifyMsgDto.java
View file @
9b81ca6f
...
@@ -43,7 +43,7 @@ public class RectifyMsgDto extends BaseDto {
...
@@ -43,7 +43,7 @@ public class RectifyMsgDto extends BaseDto {
private
String
generateStage
;
private
String
generateStage
;
@ApiModelProperty
(
value
=
"质量问题描述"
)
@ApiModelProperty
(
value
=
"质量问题描述"
)
private
String
desc
;
private
String
problemDescribe
;
@ApiModelProperty
(
value
=
"项目名称"
)
@ApiModelProperty
(
value
=
"项目名称"
)
private
String
name
;
private
String
name
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/AttachmentMapper.java
View file @
9b81ca6f
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.ugp.api.mapper;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.ugp.api.mapper;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Attachment
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Attachment
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
/**
/**
...
@@ -19,4 +20,6 @@ public interface AttachmentMapper extends BaseMapper<Attachment> {
...
@@ -19,4 +20,6 @@ public interface AttachmentMapper extends BaseMapper<Attachment> {
//根据source_id查询附件
//根据source_id查询附件
AttachmentDto
selectAttBySeq
(
Long
sourceId
);
AttachmentDto
selectAttBySeq
(
Long
sourceId
);
@Select
(
"select info from tz_ugp_attachment where source_id =#{sourceId}"
)
AttachmentDto
getAttachment
(
Long
sourceId
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/InstallNoticeMapper.xml
View file @
9b81ca6f
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<if
test=
"constructionUnit != '' and constructionUnit != null"
>
<if
test=
"constructionUnit != '' and constructionUnit != null"
>
and a.construction_unit LIKE concat("%",#{constructionUnit},"%")
and a.construction_unit LIKE concat("%",#{constructionUnit},"%")
</if>
</if>
<if
test=
"ids != null"
>
<if
test=
"ids != null
and ids.size > 0
"
>
and a.project_id in
and a.project_id in
<foreach
collection=
"ids"
item =
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"ids"
item =
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
#{item}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/ProjectMapper.xml
View file @
9b81ca6f
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<if
test=
"roleName == '设计单位'"
>
<if
test=
"roleName == '设计单位'"
>
and design_unit_id = #{companyId}
and design_unit_id = #{companyId}
</if>
</if>
<if
test=
"codes != null "
>
<if
test=
"codes != null
and codes.size > 0
"
>
<if
test=
"roleName == '监察部门' or roleName == '监检机构'"
>
<if
test=
"roleName == '监察部门' or roleName == '监检机构'"
>
and install_region_code in
and install_region_code in
<foreach
collection=
"codes"
item =
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"codes"
item =
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/ProjectResourceMapper.xml
View file @
9b81ca6f
...
@@ -123,7 +123,7 @@
...
@@ -123,7 +123,7 @@
<if
test=
"roleName == '设计单位'"
>
<if
test=
"roleName == '设计单位'"
>
and design_unit_id = #{companyId}
and design_unit_id = #{companyId}
</if>
</if>
<if
test=
"codes != null "
>
<if
test=
"codes != null
and codes.size > 0
"
>
<if
test=
"roleName == '监察部门' or roleName == '监检机构'"
>
<if
test=
"roleName == '监察部门' or roleName == '监检机构'"
>
and install_region_code in
and install_region_code in
<foreach
collection=
"codes"
item =
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"codes"
item =
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
...
@@ -152,7 +152,7 @@
...
@@ -152,7 +152,7 @@
LEFT JOIN tz_ugp_project AS project ON project.sequence_nbr = resource.project_id
LEFT JOIN tz_ugp_project AS project ON project.sequence_nbr = resource.project_id
<where>
<where>
resource.type = #{type}
resource.type = #{type}
<if
test=
"projectResourceDto !=null"
>
<if
test=
"projectResourceDto !=
null"
>
<if
test=
"projectResourceDto.name !=null and projectResourceDto.name != ''"
>
<if
test=
"projectResourceDto.name !=null and projectResourceDto.name != ''"
>
and material.`name` LIKE CONCAT("%",#{projectResourceDto.name},"%")
and material.`name` LIKE CONCAT("%",#{projectResourceDto.name},"%")
</if>
</if>
...
@@ -160,7 +160,7 @@
...
@@ -160,7 +160,7 @@
and project.`name` LIKE CONCAT("%",#{projectResourceDto.projectName},"%")
and project.`name` LIKE CONCAT("%",#{projectResourceDto.projectName},"%")
</if>
</if>
</if>
</if>
<if
test=
"codes !=null"
>
<if
test=
"codes !=null
and codes.size > 0
"
>
AND resource.project_id in
AND resource.project_id in
<foreach
collection=
"codes"
item =
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"codes"
item =
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
#{item}
...
@@ -187,7 +187,10 @@
...
@@ -187,7 +187,10 @@
LEFT JOIN tz_ugp_project AS project ON project.sequence_nbr = resource.project_id
LEFT JOIN tz_ugp_project AS project ON project.sequence_nbr = resource.project_id
LEFT JOIN tz_ugp_equipment AS equipment ON equipment.sequence_nbr = resource.resource_id
LEFT JOIN tz_ugp_equipment AS equipment ON equipment.sequence_nbr = resource.resource_id
<where>
<where>
<if
test=
"type!=null and type!=''"
>
resource.type = #{type}
resource.type = #{type}
</if>
<if
test=
"projectResourceDto !=null"
>
<if
test=
"projectResourceDto !=null"
>
<if
test=
"projectResourceDto.name !=null and projectResourceDto.name != ''"
>
<if
test=
"projectResourceDto.name !=null and projectResourceDto.name != ''"
>
and equipment.`name` LIKE CONCAT("%",#{projectResourceDto.name},"%")
and equipment.`name` LIKE CONCAT("%",#{projectResourceDto.name},"%")
...
@@ -196,7 +199,7 @@
...
@@ -196,7 +199,7 @@
and project.`name` LIKE CONCAT("%",#{projectResourceDto.projectName},"%")
and project.`name` LIKE CONCAT("%",#{projectResourceDto.projectName},"%")
</if>
</if>
</if>
</if>
<if
test=
"codes !=null"
>
<if
test=
"codes !=null
and codes.size > 0
"
>
AND resource.project_id in
AND resource.project_id in
<foreach
collection=
"codes"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"codes"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
#{item}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/QualityProblemMapper.xml
View file @
9b81ca6f
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<if
test=
"qualityProblemDto.code != '' and qualityProblemDto.code != null"
>
<if
test=
"qualityProblemDto.code != '' and qualityProblemDto.code != null"
>
and qi.`code` like concat("%",#{qualityProblemDto.code},"%")
and qi.`code` like concat("%",#{qualityProblemDto.code},"%")
</if>
</if>
<if
test=
"projectIds != null"
>
<if
test=
"projectIds != null
and projectIds.size > 0
"
>
and qi.project_id in
and qi.project_id in
<foreach
collection=
"projectIds"
index=
"index"
item=
"item"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"projectIds"
index=
"index"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
#{item}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/VerifyMapper.xml
View file @
9b81ca6f
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
order by vf.verify_time desc
ORDER BY vf.verify_time DESC
</select>
</select>
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectResourceController.java
View file @
9b81ca6f
...
@@ -293,7 +293,7 @@ public class ProjectResourceController extends BaseController {
...
@@ -293,7 +293,7 @@ public class ProjectResourceController extends BaseController {
@ApiOperation
(
httpMethod
=
"get"
,
value
=
"根据当前登录人获取登录人参与的项目列表"
,
notes
=
"根据当前登录人获取登录人参与的项目列表"
)
@ApiOperation
(
httpMethod
=
"get"
,
value
=
"根据当前登录人获取登录人参与的项目列表"
,
notes
=
"根据当前登录人获取登录人参与的项目列表"
)
public
ResponseModel
<
List
<
Project
>>
selectByUserId
(){
public
ResponseModel
<
List
<
Project
>>
selectByUserId
(){
List
<
Project
>
projectList
=
projectResourceServiceImpl
.
getProjectList
();
List
<
Project
>
projectList
=
projectResourceServiceImpl
.
getProjectList
();
projectList
=
projectList
.
stream
().
filter
(
r
->
r
.
getStatus
().
equals
(
ProjectInitiationEnum
.
流程结束
.
getName
())).
collect
(
Collectors
.
toList
());
projectList
=
projectList
.
stream
().
filter
(
r
->
ProjectInitiationEnum
.
流程结束
.
getName
().
equals
(
r
.
getStatus
())).
collect
(
Collectors
.
toList
());
return
ResponseHelper
.
buildResponse
(
projectList
);
return
ResponseHelper
.
buildResponse
(
projectList
);
}
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/AttachmentServiceImpl.java
View file @
9b81ca6f
...
@@ -12,6 +12,8 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper;
...
@@ -12,6 +12,8 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper;
import
com.yeejoin.amos.boot.module.ugp.api.service.IAttachmentService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IAttachmentService
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
org.apache.commons.lang.StringUtils
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
@@ -38,6 +40,8 @@ public class AttachmentServiceImpl extends BaseService<AttachmentDto,Attachment,
...
@@ -38,6 +40,8 @@ public class AttachmentServiceImpl extends BaseService<AttachmentDto,Attachment,
@Autowired
@Autowired
OrgUsrServiceImpl
orgUsrService
;
OrgUsrServiceImpl
orgUsrService
;
@Autowired
private
AttachmentMapper
attachmentMapper
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -97,4 +101,14 @@ public class AttachmentServiceImpl extends BaseService<AttachmentDto,Attachment,
...
@@ -97,4 +101,14 @@ public class AttachmentServiceImpl extends BaseService<AttachmentDto,Attachment,
return
map
;
return
map
;
}
}
//source_id和附件类型查询数据
public
AttachmentDto
getAttachment
(
Long
sourceId
){
if
(
sourceId
==
null
)
{
return
new
AttachmentDto
();
}
return
attachmentMapper
.
getAttachment
(
sourceId
);
}
}
}
\ No newline at end of file
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 @
9b81ca6f
...
@@ -228,4 +228,9 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
...
@@ -228,4 +228,9 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
}
}
public
Equipment
getEquipment
(
Long
e
){
return
equipmentMapper
.
selectById
(
e
);
}
}
}
\ No newline at end of file
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/InstallNoticeServiceImpl.java
View file @
9b81ca6f
...
@@ -71,6 +71,11 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
...
@@ -71,6 +71,11 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
String
id
=
String
.
valueOf
(
project
.
getSequenceNbr
());
String
id
=
String
.
valueOf
(
project
.
getSequenceNbr
());
ids
.
add
(
id
);
ids
.
add
(
id
);
}
}
if
(
ValidationUtil
.
isEmpty
(
ids
)){
return
page
;
}
Page
<
InstallNoticePageDto
>
installNoticePage
=
installNoticeMapper
.
installNoticePage
(
page
,
name
,
constructionUnit
,
ids
);
Page
<
InstallNoticePageDto
>
installNoticePage
=
installNoticeMapper
.
installNoticePage
(
page
,
name
,
constructionUnit
,
ids
);
List
<
InstallNoticePageDto
>
installNoticePageDtos
=
installNoticePage
.
getRecords
();
List
<
InstallNoticePageDto
>
installNoticePageDtos
=
installNoticePage
.
getRecords
();
for
(
InstallNoticePageDto
installNoticePageDto:
installNoticePageDtos
){
for
(
InstallNoticePageDto
installNoticePageDto:
installNoticePageDtos
){
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/MaterialServiceImpl.java
View file @
9b81ca6f
...
@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper;
...
@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.MaterialMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.MaterialMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IMaterialService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IMaterialService
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
@@ -39,6 +40,8 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
...
@@ -39,6 +40,8 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
AttachmentMapper
attachmentMapper
;
AttachmentMapper
attachmentMapper
;
@Autowired
@Autowired
OrgServiceImpl
orgService
;
OrgServiceImpl
orgService
;
@Autowired
MaterialMapper
materialMapper
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -165,4 +168,9 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
...
@@ -165,4 +168,9 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
}
}
return
jsonObject
;
return
jsonObject
;
}
}
public
Material
getMaterial
(
Long
materialId
){
Material
material
=
materialMapper
.
selectById
(
materialId
);
return
material
;
}
}
}
\ No newline at end of file
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 @
9b81ca6f
...
@@ -80,7 +80,9 @@ public class OrgServiceImpl {
...
@@ -80,7 +80,9 @@ public class OrgServiceImpl {
dynamicFormInstance
.
setFormColumnId
(
dynamicFormColumn
.
getSequenceNbr
());
dynamicFormInstance
.
setFormColumnId
(
dynamicFormColumn
.
getSequenceNbr
());
//通过字段名去拿到表单传来的值
//通过字段名去拿到表单传来的值
if
(
"image"
.
equals
(
dynamicFormColumn
.
getFieldCode
())){
if
(
"image"
.
equals
(
dynamicFormColumn
.
getFieldCode
())){
dynamicFormInstance
.
setFieldValue
(
JSON
.
toJSONString
(
jsonObject
.
getJSONArray
(
dynamicFormInstance
.
getFieldCode
())));
if
(!
ValidationUtil
.
isEmpty
(
jsonObject
.
getJSONArray
(
dynamicFormInstance
.
getFieldCode
()))){
dynamicFormInstance
.
setFieldValue
(
JSON
.
toJSONString
(
jsonObject
.
getJSONArray
(
dynamicFormInstance
.
getFieldCode
())));
}
}
else
{
}
else
{
dynamicFormInstance
.
setFieldValue
(
jsonObject
.
getString
(
dynamicFormInstance
.
getFieldCode
()));
dynamicFormInstance
.
setFieldValue
(
jsonObject
.
getString
(
dynamicFormInstance
.
getFieldCode
()));
}
}
...
@@ -270,7 +272,7 @@ public class OrgServiceImpl {
...
@@ -270,7 +272,7 @@ public class OrgServiceImpl {
map
.
put
(
"sequenceNbr"
,
sequenceNbr
);
map
.
put
(
"sequenceNbr"
,
sequenceNbr
);
for
(
DynamicFormInstance
dynamicFormInstance
:
dynamicFormInstanceList
)
{
for
(
DynamicFormInstance
dynamicFormInstance
:
dynamicFormInstanceList
)
{
if
(
"image"
.
equals
(
dynamicFormInstance
.
getFieldCode
())){
if
(
"image"
.
equals
(
dynamicFormInstance
.
getFieldCode
())){
if
(!
ValidationUtil
.
isEmpty
(
dynamicFormInstance
.
getFieldValue
())){
if
(!
ValidationUtil
.
isEmpty
(
dynamicFormInstance
.
getFieldValue
())
||
!
"null"
.
equals
(
dynamicFormInstance
.
getFieldValue
())
){
map
.
put
(
dynamicFormInstance
.
getFieldCode
(),
JSON
.
parseArray
(
dynamicFormInstance
.
getFieldValue
()));
map
.
put
(
dynamicFormInstance
.
getFieldCode
(),
JSON
.
parseArray
(
dynamicFormInstance
.
getFieldValue
()));
}
}
}
else
{
}
else
{
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/QualityProblemServiceImpl.java
View file @
9b81ca6f
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.QualityProblemMapper;
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.QualityProblemMapper;
import
com.yeejoin.amos.boot.module.ugp.api.service.IQualityProblemService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IQualityProblemService
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.QualityProblemDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.QualityProblemDto
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -64,9 +65,21 @@ public class QualityProblemServiceImpl extends BaseService<QualityProblemDto,Qua
...
@@ -64,9 +65,21 @@ public class QualityProblemServiceImpl extends BaseService<QualityProblemDto,Qua
page
=
qualityProblemMapper
.
getItems
(
page
,
qualityProblemDto
,
projectIds
);
page
=
qualityProblemMapper
.
getItems
(
page
,
qualityProblemDto
,
projectIds
);
List
<
QualityProblemDto
>
qualityProblemDtoList
=
page
.
getRecords
();
List
<
QualityProblemDto
>
qualityProblemDtoList
=
page
.
getRecords
();
for
(
QualityProblemDto
qualityProblemDto1
:
qualityProblemDtoList
)
{
for
(
QualityProblemDto
qualityProblemDto1
:
qualityProblemDtoList
)
{
qualityProblemDto1
.
setChargerPersonName
(
orgService
.
getOrgUsrById
(
qualityProblemDto1
.
getChargerPersonId
()).
getBizOrgName
());
if
(!
ValidationUtil
.
isEmpty
(
qualityProblemDto1
.
getChargerPersonId
())){
qualityProblemDto1
.
setInspectorName
(
orgService
.
getOrgUsrById
(
qualityProblemDto1
.
getInspectorId
()).
getBizOrgName
());
if
(!
ValidationUtil
.
isEmpty
(
orgService
.
getOrgUsrById
(
qualityProblemDto1
.
getChargerPersonId
()))){
qualityProblemDto1
.
setVerifyUnitName
(
orgService
.
getOrgUsrById
(
qualityProblemDto1
.
getVerifyUnitId
()).
getBizOrgName
());
qualityProblemDto1
.
setChargerPersonName
(
orgService
.
getOrgUsrById
(
qualityProblemDto1
.
getChargerPersonId
()).
getBizOrgName
());
}
}
if
(!
ValidationUtil
.
isEmpty
(
qualityProblemDto1
.
getInspectorId
())){
if
(!
ValidationUtil
.
isEmpty
(
orgService
.
getOrgUsrById
(
qualityProblemDto1
.
getInspectorId
()))){
qualityProblemDto1
.
setInspectorName
(
orgService
.
getOrgUsrById
(
qualityProblemDto1
.
getInspectorId
()).
getBizOrgName
());
}
}
if
(!
ValidationUtil
.
isEmpty
(
qualityProblemDto1
.
getVerifyUnitId
()))
{
if
(!
ValidationUtil
.
isEmpty
(
orgService
.
getOrgUsrById
(
qualityProblemDto1
.
getVerifyUnitId
()))){
qualityProblemDto1
.
setVerifyUnitName
(
orgService
.
getOrgUsrById
(
qualityProblemDto1
.
getVerifyUnitId
()).
getBizOrgName
());
}
}
list
.
add
(
qualityProblemDto1
);
list
.
add
(
qualityProblemDto1
);
}
}
page
.
setRecords
(
list
);
page
.
setRecords
(
list
);
...
...
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 @
9b81ca6f
...
@@ -17,12 +17,7 @@ import com.yeejoin.amos.boot.module.ugp.api.Enum.VerifyTypeEnum;
...
@@ -17,12 +17,7 @@ import com.yeejoin.amos.boot.module.ugp.api.Enum.VerifyTypeEnum;
import
com.yeejoin.amos.boot.module.ugp.api.constants.XJConstant
;
import
com.yeejoin.amos.boot.module.ugp.api.constants.XJConstant
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.*
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.*
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.*
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.QualityProblem
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Verify
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Weld
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.VerifyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.VerifyMapper
;
...
@@ -31,10 +26,12 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.WeldMapper;
...
@@ -31,10 +26,12 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.WeldMapper;
import
com.yeejoin.amos.boot.module.ugp.api.service.IVerifyService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IVerifyService
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
jnr.ffi.Struct
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -43,6 +40,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -43,6 +40,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
java.awt.*
;
import
java.awt.*
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
import
java.util.List
;
import
java.util.List
;
...
@@ -97,7 +96,11 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -97,7 +96,11 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
private
ProjectServiceImpl
projectServiceImpl
;
private
ProjectServiceImpl
projectServiceImpl
;
@Autowired
@Autowired
private
ProjectResourceServiceImpl
projectResourceService
;
private
ProjectResourceServiceImpl
projectResourceService
;
@Autowired
private
AttachmentServiceImpl
attachmentService
;
@Autowired
private
ProblemInitiationServiceImpl
problemInitiationService
;
/**
/**
* 分页查询
* 分页查询
...
@@ -202,13 +205,13 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -202,13 +205,13 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
}
}
}
}
}
}
//人员持证判断
(写死)
//人员持证判断
String
peopleStatus
=
jsonObject
.
getString
(
"peopleStatus"
);
String
peopleStatus
=
jsonObject
.
getString
(
"peopleStatus"
);
if
(!
StringUtils
.
isEmpty
(
peopleStatus
))
{
if
(!
StringUtils
.
isEmpty
(
peopleStatus
))
{
dto
.
setPeopleStatus
(
peopleStatus
);
dto
.
setPeopleStatus
(
peopleStatus
);
}
}
//设备检定状态
(写死)
//设备检定状态
String
facilityStatus
=
jsonObject
.
getString
(
"peopleStatus"
);
String
facilityStatus
=
jsonObject
.
getString
(
"peopleStatus"
);
if
(!
StringUtils
.
isEmpty
(
facilityStatus
))
{
if
(!
StringUtils
.
isEmpty
(
facilityStatus
))
{
dto
.
setFacilityStatus
(
facilityStatus
);
dto
.
setFacilityStatus
(
facilityStatus
);
...
@@ -319,15 +322,13 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -319,15 +322,13 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
Long
welderId
=
orgService
.
getReginParams
(
).
getBusinessInfo
(
).
getUserSequenceNbr
(
);
Long
welderId
=
orgService
.
getReginParams
(
).
getBusinessInfo
(
).
getUserSequenceNbr
(
);
Long
random
=
jsonObject
.
getLong
(
"random"
);
//随机值
Long
random
=
jsonObject
.
getLong
(
"random"
);
//随机值
Long
projectId
=
jsonObject
.
getLong
(
"projectId"
);
//项目id
Long
projectId
=
jsonObject
.
getLong
(
"projectId"
);
//项目id
//假数据
Long welderId = jsonObject.getLong("welderId"); //焊工id
//
Long welderId = jsonObject.getLong("welderId"); //焊工id
String
location
=
jsonObject
.
getString
(
"location"
);
//焊接定位信息
String
location
=
jsonObject
.
getString
(
"location"
);
//焊接定位信息
String
stage
=
jsonObject
.
getString
(
"stage"
);
//阶段检验
String
stage
=
jsonObject
.
getString
(
"stage"
);
//阶段检验
Date
time
=
new
Date
();
// //获取当前校验时间
Date
time
=
new
Date
();
// //获取当前校验时间
String
photo
=
jsonObject
.
getString
(
"photo"
);
//图片
String
photo
=
jsonObject
.
getString
(
"photo"
);
//图片
Verify
verify
=
new
Verify
(
);
Verify
verify
=
new
Verify
(
);
jsonObject
.
put
(
"welderId"
,
welderId
);
jsonObject
.
put
(
"welderId"
,
welderId
);
verify
.
setProjectId
(
projectId
);
//项目id
verify
.
setProjectId
(
projectId
);
//项目id
verify
.
setType
(
TYPE
);
//检验方式
verify
.
setType
(
TYPE
);
//检验方式
verify
.
setVerifyTime
(
time
);
//获取当前时间
verify
.
setVerifyTime
(
time
);
//获取当前时间
...
@@ -336,21 +337,46 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -336,21 +337,46 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
if
(
stage
.
equals
(
StageEnum
.
焊前人员
.
getVerifyName
()))
{
if
(
stage
.
equals
(
StageEnum
.
焊前人员
.
getVerifyName
()))
{
verify
.
setStage
(
StageEnum
.
焊前人员
.
getStage
());
//阶段
verify
.
setStage
(
StageEnum
.
焊前人员
.
getStage
());
//阶段
/**写死*/
//人脸
Boolean
flag
=
true
;
//1.人脸识别校验
//1.人脸识别校验
//2.焊工资质有效期判断,查询焊工信息获取
//2.焊工资质有效期判断,查询焊工信息获取
//3.证书是否和项目符合
//3.证书是否和项目符合
//失败
//失败
//属性赋值
//属性赋值
jsonObject
.
put
(
"accord"
,
"符合"
);
jsonObject
.
put
(
"accord"
,
"符合"
);
jsonObject
.
put
(
"valid"
,
"有效"
);
if
(
welderId
!=
null
)
{
Map
map
=
orgService
.
getdetialInfo
(
welderId
.
toString
(
));
String
certValidDate
=
String
.
valueOf
(
map
.
get
(
"certValidDate"
));
if
(
StringUtils
.
isNotEmpty
(
certValidDate
))
{
Date
vaildParse
=
null
;
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
try
{
vaildParse
=
sdf
.
parse
(
certValidDate
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
(
);
}
if
(
time
.
compareTo
(
vaildParse
)
<=
0
)
{
jsonObject
.
put
(
"valid"
,
"有效"
);
}
else
{
jsonObject
.
put
(
"valid"
,
"已过期"
);
}
}
}
Boolean
flag
=
true
;
if
(!
"符合"
.
equals
(
jsonObject
.
getString
(
"accord"
))
||
!
"有效"
.
equals
(
jsonObject
.
getString
(
"valid"
)))
{
flag
=
false
;
}
jsonObject
.
put
(
"peopleStatus"
,
"合格"
);
jsonObject
.
put
(
"peopleStatus"
,
"合格"
);
String
targetInfo
=
jsonObject
.
toString
();
String
targetInfo
=
jsonObject
.
toString
();
verify
.
setTargetInfo
(
targetInfo
);
//json信息
verify
.
setTargetInfo
(
targetInfo
);
//json信息
if
(!
flag
)
{
if
(!
flag
)
{
this
.
addFailData
(
verify
,
jsonObject
,
new
QualityProblem
());
jsonObject
.
put
(
"peopleStatus"
,
"不合格"
);
this
.
addFailData
(
verify
,
jsonObject
,
new
QualityProblem
(),
null
);
return
VerifyEnum
.
未通过
.
getName
();
return
VerifyEnum
.
未通过
.
getName
();
}
}
//成功
//成功
...
@@ -363,17 +389,34 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -363,17 +389,34 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
Long
materialId
=
jsonObject
.
getLong
(
"materialId"
);
//管材id
Long
materialId
=
jsonObject
.
getLong
(
"materialId"
);
//管材id
verify
.
setStage
(
StageEnum
.
焊前管材质量
.
getStage
());
verify
.
setStage
(
StageEnum
.
焊前管材质量
.
getStage
());
/**校验*/
/**校验*/
Boolean
flag
=
true
;
Boolean
flag
=
false
;
jsonObject
.
put
(
"valid"
,
"有效"
);
if
(!
ValidationUtil
.
isEmpty
(
materialId
))
{
jsonObject
.
put
(
"accord"
,
"符合"
);
Material
material
=
materialService
.
getMaterial
(
materialId
);
jsonObject
.
put
(
"manufacturer"
,
"前端上传的管材厂家"
);
if
(!
ValidationUtil
.
isEmpty
(
material
))
{
jsonObject
.
put
(
"batchNumber"
,
"前端上传管材批号"
);
jsonObject
.
put
(
"valid"
,
"有效"
);
jsonObject
.
put
(
"permission"
,
"最终管材质量效验结果"
);
jsonObject
.
put
(
"accord"
,
"符合"
);
flag
=
true
;
if
(
StringUtils
.
isNotEmpty
(
material
.
getManufacturer
()))
{
jsonObject
.
put
(
"manufacturer"
,
material
.
getManufacturer
());
}
if
(
StringUtils
.
isNotEmpty
(
material
.
getBatchNum
()))
{
jsonObject
.
put
(
"batchNumber"
,
material
.
getBatchNum
());
}
jsonObject
.
put
(
"permission"
,
"合格期内"
);
}
else
{
jsonObject
.
put
(
"valid"
,
"已超期"
);
jsonObject
.
put
(
"accord"
,
"不符合"
);
jsonObject
.
put
(
"permission"
,
"不合格"
);
}
}
String
targetInfo
=
jsonObject
.
toString
();
String
targetInfo
=
jsonObject
.
toString
();
verify
.
setTargetInfo
(
targetInfo
);
//json信息
verify
.
setTargetInfo
(
targetInfo
);
//json信息
if
(!
flag
)
{
if
(!
flag
)
{
//不通过, 添加数据并返回未通过结果
//不通过, 添加数据并返回未通过结果
this
.
addFailData
(
verify
,
jsonObject
,
new
QualityProblem
());
this
.
addFailData
(
verify
,
jsonObject
,
new
QualityProblem
()
,
null
);
return
VerifyEnum
.
未通过
.
getName
();
return
VerifyEnum
.
未通过
.
getName
();
}
}
//校验通过
//校验通过
...
@@ -383,21 +426,39 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -383,21 +426,39 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
if
(
stage
.
equals
(
StageEnum
.
焊前设备
.
getVerifyName
())){
if
(
stage
.
equals
(
StageEnum
.
焊前设备
.
getVerifyName
())){
verify
.
setStage
(
StageEnum
.
焊前设备
.
getStage
());
verify
.
setStage
(
StageEnum
.
焊前设备
.
getStage
());
Long
weldingId
=
jsonObject
.
getLong
(
"weldingId"
);
/**
/**
* 效验假数据
* 效验假数据
*/
*/
Boolean
flag
=
tru
e
;
Boolean
flag
=
fals
e
;
//后面需要修改此处
//后面需要修改此处
jsonObject
.
put
(
"valid"
,
"有效"
);
if
(!
ValidationUtil
.
isEmpty
(
weldingId
))
{
jsonObject
.
put
(
"accord"
,
"符合"
);
Equipment
equipment
=
equipmentService
.
getEquipment
(
weldingId
);
jsonObject
.
put
(
"facilityStatus"
,
"合格期内"
);
if
(!
ValidationUtil
.
isEmpty
(
equipment
))
{
jsonObject
.
put
(
"facilityNumber"
,
"传的焊机编号"
);
jsonObject
.
put
(
"valid"
,
"有效"
);
jsonObject
.
put
(
"facilityName"
,
"前端传的焊机名称"
);
jsonObject
.
put
(
"accord"
,
"符合"
);
jsonObject
.
put
(
"facilityStatus"
,
"合格期内"
);
if
(
StringUtils
.
isNotEmpty
(
equipment
.
getName
()))
{
jsonObject
.
put
(
"facilityName"
,
equipment
.
getName
());
}
if
(
StringUtils
.
isNotEmpty
(
equipment
.
getCode
()))
{
jsonObject
.
put
(
"facilityNumber"
,
equipment
.
getCode
());
}
flag
=
true
;
}
else
{
jsonObject
.
put
(
"valid"
,
"已超期"
);
jsonObject
.
put
(
"accord"
,
"不符合"
);
jsonObject
.
put
(
"facilityStatus"
,
"不合格"
);
}
}
String
targetInfo
=
jsonObject
.
toString
();
String
targetInfo
=
jsonObject
.
toString
();
verify
.
setTargetInfo
(
targetInfo
);
//json信息
verify
.
setTargetInfo
(
targetInfo
);
//json信息
if
(!
flag
)
{
if
(!
flag
)
{
//校验不通过
//校验不通过
this
.
addFailData
(
verify
,
jsonObject
,
new
QualityProblem
());
this
.
addFailData
(
verify
,
jsonObject
,
new
QualityProblem
()
,
null
);
return
VerifyEnum
.
未通过
.
getName
();
return
VerifyEnum
.
未通过
.
getName
();
}
}
//效验通过
//效验通过
...
@@ -468,7 +529,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -468,7 +529,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
verify
.
setTargetInfo
(
targetInfo
);
//json信息
verify
.
setTargetInfo
(
targetInfo
);
//json信息
if
(!
flag
)
{
if
(!
flag
)
{
//校验不通过
//校验不通过
this
.
addFailData
(
verify
,
jsonObject
,
new
QualityProblem
());
this
.
addFailData
(
verify
,
jsonObject
,
new
QualityProblem
()
,
null
);
return
VerifyEnum
.
未通过
.
getName
();
return
VerifyEnum
.
未通过
.
getName
();
}
}
//效验通过
//效验通过
...
@@ -544,8 +605,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -544,8 +605,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
verify
.
setTargetInfo
(
targetInfo
);
//json信息
verify
.
setTargetInfo
(
targetInfo
);
//json信息
if
(!
flag
)
{
if
(!
flag
)
{
//校验不通过
//校验不通过
jsonObject
.
put
(
"code"
,
manyCode
);
this
.
addFailData
(
verify
,
jsonObject
,
new
QualityProblem
(),
codeArray
);
this
.
addFailData
(
verify
,
jsonObject
,
new
QualityProblem
());
return
VerifyEnum
.
未通过
.
getName
();
return
VerifyEnum
.
未通过
.
getName
();
}
}
//效验通过
//效验通过
...
@@ -592,8 +652,8 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -592,8 +652,8 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
verify
.
setTargetInfo
(
targetInfo
);
//json信息
verify
.
setTargetInfo
(
targetInfo
);
//json信息
if
(!
flag
)
{
if
(!
flag
)
{
//校验不通过
//校验不通过
jsonObject
.
put
(
"code"
,
manyCode
);
String
[]
codeArray
=
manyCode
.
split
(
","
);
this
.
addFailData
(
verify
,
jsonObject
,
new
QualityProblem
());
this
.
addFailData
(
verify
,
jsonObject
,
new
QualityProblem
()
,
codeArray
);
return
VerifyEnum
.
未通过
.
getName
();
return
VerifyEnum
.
未通过
.
getName
();
}
}
//效验通过
//效验通过
...
@@ -638,9 +698,9 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -638,9 +698,9 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
verify
.
setTargetInfo
(
targetInfo
);
//json信息
verify
.
setTargetInfo
(
targetInfo
);
//json信息
if
(!
flag
)
{
if
(!
flag
)
{
//校验不通过
//校验不通过
jsonObject
.
put
(
"code"
,
manyCode
);
QualityProblem
qp
=
new
QualityProblem
(
);
QualityProblem
qp
=
new
QualityProblem
(
);
this
.
addFailData
(
verify
,
jsonObject
,
qp
);
String
[]
codeArray
=
manyCode
.
split
(
","
);
this
.
addFailData
(
verify
,
jsonObject
,
qp
,
codeArray
);
return
VerifyEnum
.
未通过
.
getName
();
return
VerifyEnum
.
未通过
.
getName
();
}
}
//效验通过
//效验通过
...
@@ -683,9 +743,9 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -683,9 +743,9 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
verify
.
setTargetInfo
(
targetInfo
);
//json信息
verify
.
setTargetInfo
(
targetInfo
);
//json信息
if
(!
flag
)
{
if
(!
flag
)
{
//校验不通过
//校验不通过
jsonObject
.
put
(
"code"
,
manyCode
);
QualityProblem
qualityProblem
=
new
QualityProblem
(
);
QualityProblem
qualityProblem
=
new
QualityProblem
(
);
this
.
addFailData
(
verify
,
jsonObject
,
qualityProblem
);
String
[]
codeArray
=
manyCode
.
split
(
","
);
this
.
addFailData
(
verify
,
jsonObject
,
qualityProblem
,
codeArray
);
return
VerifyEnum
.
未通过
.
getName
();
return
VerifyEnum
.
未通过
.
getName
();
}
}
//效验通过
//效验通过
...
@@ -706,7 +766,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -706,7 +766,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
* @param verify
* @param verify
* @param qualityProblem
* @param qualityProblem
*/
*/
public
void
addFailData
(
Verify
verify
,
JSONObject
jsonObject
,
QualityProblem
qualityProblem
){
public
void
addFailData
(
Verify
verify
,
JSONObject
jsonObject
,
QualityProblem
qualityProblem
,
String
[]
codeArray
){
//校验不通过,存入校验信息,
//校验不通过,存入校验信息,
verify
.
setStatus
(
VerifyEnum
.
未通过
.
getStatus
());
verify
.
setStatus
(
VerifyEnum
.
未通过
.
getStatus
());
try
{
try
{
...
@@ -722,10 +782,26 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -722,10 +782,26 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
qualityProblem
.
setSubmitDate
(
new
Date
());
qualityProblem
.
setSubmitDate
(
new
Date
());
//随机生成四位数
//随机生成四位数
String
random
=
String
.
valueOf
((
int
)
((
Math
.
random
(
)
*
9
+
1
)
*
1000
));
String
random
=
String
.
valueOf
((
int
)
((
Math
.
random
(
)
*
9
+
1
)
*
1000
));
if
(!
StringUtils
.
isEmpty
(
jsonObject
.
getString
(
"code"
)))
{
if
(
codeArray
==
null
||
codeArray
.
length
==
0
)
{
String
code
=
jsonObject
.
getString
(
"code"
);
//获取焊口编码
qualityProblem
.
setCode
(
code
+
"-WT"
+
random
);
String
code
=
jsonObject
.
getString
(
"code"
);
//获取焊口编码
if
(
StringUtils
.
isNotEmpty
(
code
))
{
//焊前
qualityProblem
.
setCode
(
code
+
"-WT"
+
random
);
}
else
{
qualityProblem
.
setCode
(
jsonObject
.
getLong
(
"random"
)+
"-WT"
+
random
);
}
}
if
(
codeArray
!=
null
&&
codeArray
.
length
>
0
)
{
for
(
String
code
:
codeArray
)
{
if
(!
StringUtils
.
isEmpty
(
jsonObject
.
getString
(
code
)))
{
qualityProblem
.
setCode
(
code
+
"-WT"
+
random
);
}
}
}
}
String
stage
=
jsonObject
.
getString
(
"stage"
);
//获取效验阶段
String
stage
=
jsonObject
.
getString
(
"stage"
);
//获取效验阶段
qualityProblem
.
setGenerateStage
(
stage
);
qualityProblem
.
setGenerateStage
(
stage
);
qualityProblem
.
setProblemDescribe
(
stage
+
"不通过"
);
qualityProblem
.
setProblemDescribe
(
stage
+
"不通过"
);
...
@@ -734,7 +810,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -734,7 +810,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
Long
sequenceNbr
=
verify1
.
getSequenceNbr
(
);
Long
sequenceNbr
=
verify1
.
getSequenceNbr
(
);
qualityProblem
.
setStageVerifyId
(
sequenceNbr
);
qualityProblem
.
setStageVerifyId
(
sequenceNbr
);
qualityProblemService
.
save
(
qualityProblem
);
qualityProblemService
.
save
(
qualityProblem
);
problemInitiationService
.
start
(
qualityProblem
);
}
}
...
@@ -818,52 +894,98 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -818,52 +894,98 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
if
(
verify
!=
null
&&
!
StringUtils
.
isEmpty
(
verify
.
getStatus
()))
{
if
(
verify
!=
null
&&
!
StringUtils
.
isEmpty
(
verify
.
getStatus
()))
{
String
targetInfo
=
verify
.
getTargetInfo
();
String
targetInfo
=
verify
.
getTargetInfo
();
JSONObject
object
=
JSONObject
.
parseObject
(
targetInfo
);
JSONObject
object
=
JSONObject
.
parseObject
(
targetInfo
);
//获取照片
//获取
新
照片
String
newPhoto
=
object
.
getString
(
"photo"
);
String
newPhoto
=
object
.
getString
(
"photo"
);
if
(!
StringUtils
.
isEmpty
(
newPhoto
))
{
if
(!
StringUtils
.
isEmpty
(
newPhoto
))
{
//
openDto.setNewPhoto(newPhoto);
openDto
.
setNewPhoto
(
newPhoto
);
}
}
openDto
.
setNewPhoto
(
"upload/ugp/amos_studio/EF4E6343E355665B6663DE139226F06A.jpg"
);
openDto
.
setOldPhoto
(
"upload/ugp/amos_studio/EF4E6343E355665B6663DE139226F06A.jpg"
);
if
(
verify
.
getStatus
().
equals
(
"0"
))
{
if
(
verify
.
getStatus
().
equals
(
"0"
))
{
openDto
.
setResult
(
VerifyEnum
.
未通过
.
getName
());
openDto
.
setResult
(
VerifyEnum
.
未通过
.
getName
());
}
}
if
(
verify
.
getStatus
().
equals
(
"1"
))
{
if
(
verify
.
getStatus
().
equals
(
"1"
))
{
openDto
.
setResult
(
VerifyEnum
.
已通过
.
getName
());
openDto
.
setResult
(
VerifyEnum
.
已通过
.
getName
());
}
}
//有效性
//有效性
String
peopleStatus
=
object
.
getString
(
"valid"
);
String
peopleStatus
=
object
.
getString
(
"valid"
);
if
(!
StringUtils
.
isEmpty
(
peopleStatus
))
{
if
(!
StringUtils
.
isEmpty
(
peopleStatus
))
{
//openDto.setValid(peopleStatus);
openDto
.
setValid
(
peopleStatus
);
}
}
//符合性
//符合性
String
accord
=
object
.
getString
(
"accord"
);
String
accord
=
object
.
getString
(
"accord"
);
if
(!
StringUtils
.
isEmpty
(
accord
))
{
if
(!
StringUtils
.
isEmpty
(
accord
))
{
//openDto.setAccord(accord);
openDto
.
setAccord
(
accord
);
}
}
//后面需删除
openDto
.
setValid
(
"有效"
);
openDto
.
setAccord
(
"符合"
);
if
(
StageEnum
.
焊前人员
.
getStage
().
equals
(
verify
.
getStage
()))
{
if
(
StageEnum
.
焊前人员
.
getStage
().
equals
(
verify
.
getStage
()))
{
Long
welderId
=
object
.
getLong
(
"welderId"
);
Long
welderId
=
object
.
getLong
(
"welderId"
);
if
(
welderId
!=
null
)
{
if
(
welderId
!=
null
)
{
openDto
.
setDetailId
(
welderId
);
openDto
.
setDetailId
(
welderId
);
//焊工的老照片
Map
map
=
orgService
.
getdetialInfo
(
welderId
.
toString
(
));
String
image
=
map
.
get
(
"image"
).
toString
();
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
image
);
for
(
Object
o
:
jsonArray
)
{
JSONObject
ob
=
JSONObject
.
parseObject
(
o
.
toString
(
));
String
url
=
ob
.
getString
(
"url"
);
if
(!
StringUtils
.
isEmpty
(
url
))
{
openDto
.
setOldPhoto
(
url
);
}
}
}
}
}
}
if
(
StageEnum
.
焊前设备
.
getStage
().
equals
(
verify
.
getStage
()))
{
if
(
StageEnum
.
焊前设备
.
getStage
().
equals
(
verify
.
getStage
()))
{
Long
weldingId
=
object
.
getLong
(
"weldingId"
);
Long
weldingId
=
object
.
getLong
(
"weldingId"
);
if
(
weldingId
!=
null
)
{
if
(
weldingId
!=
null
)
{
openDto
.
setDetailId
(
weldingId
);
openDto
.
setDetailId
(
weldingId
);
AttachmentDto
enuipment
=
attachmentService
.
getAttachment
(
weldingId
);
if
(
enuipment
!=
null
)
{
String
info
=
enuipment
.
getInfo
(
);
if
(
StringUtils
.
isNotEmpty
(
info
))
{
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
info
);
for
(
Object
o
:
jsonArray
)
{
JSONObject
object1
=
JSONObject
.
parseObject
(
o
.
toString
(
));
String
info1
=
object1
.
getString
(
"info"
);
JSONArray
jsonArray1
=
JSONArray
.
parseArray
(
info1
);
for
(
Object
o1
:
jsonArray1
)
{
JSONObject
object2
=
JSONObject
.
parseObject
(
o1
.
toString
(
));
String
url
=
object2
.
getString
(
"url"
);
if
(
StringUtils
.
isNotEmpty
(
url
))
{
openDto
.
setOldPhoto
(
url
);
}
}
}
}
}
}
}
}
}
if
(
StageEnum
.
焊前管材质量
.
getStage
().
equals
(
verify
.
getStage
()))
{
if
(
StageEnum
.
焊前管材质量
.
getStage
().
equals
(
verify
.
getStage
()))
{
Long
materialId
=
object
.
getLong
(
"materialId"
);
Long
materialId
=
object
.
getLong
(
"materialId"
);
if
(
materialId
!=
null
)
{
if
(
materialId
!=
null
)
{
openDto
.
setDetailId
(
materialId
);
openDto
.
setDetailId
(
materialId
);
AttachmentDto
enuipment
=
attachmentService
.
getAttachment
(
materialId
);
if
(
enuipment
!=
null
)
{
String
info
=
enuipment
.
getInfo
(
);
if
(
StringUtils
.
isNotEmpty
(
info
))
{
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
info
);
for
(
Object
o
:
jsonArray
)
{
JSONObject
object1
=
JSONObject
.
parseObject
(
o
.
toString
(
));
String
info1
=
object1
.
getString
(
"info"
);
JSONArray
jsonArray1
=
JSONArray
.
parseArray
(
info1
);
for
(
Object
o1
:
jsonArray1
)
{
JSONObject
object2
=
JSONObject
.
parseObject
(
o1
.
toString
(
));
String
url
=
object2
.
getString
(
"url"
);
if
(
StringUtils
.
isNotEmpty
(
url
))
{
openDto
.
setOldPhoto
(
url
);
}
}
}
}
}
}
}
}
}
...
...
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 @
9b81ca6f
...
@@ -86,7 +86,9 @@ public class WelderServiceImpl {
...
@@ -86,7 +86,9 @@ public class WelderServiceImpl {
@BusinessIdentify
@BusinessIdentify
public
OrgUsrDto
savePerson
(
JSONObject
jsonObject
,
String
bizOrgType
,
String
sequenceNbr
){
public
OrgUsrDto
savePerson
(
JSONObject
jsonObject
,
String
bizOrgType
,
String
sequenceNbr
){
if
(
ValidationUtil
.
isEmpty
(
sequenceNbr
)){
if
(
ValidationUtil
.
isEmpty
(
sequenceNbr
)){
Long
companyId
=
orgService
.
getReginParams
().
getCompany
().
getSequenceNbr
();
Long
companyId
=
orgService
.
getReginParams
().
getCompany
().
getSequenceNbr
();
Long
companyUserId
=
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanySequenceNbr
();
String
orgexpand
=
orgService
.
getOrgUsrById
(
String
.
valueOf
(
companyUserId
)).
getOrgExpandAttr1
();
Set
<
String
>
roleNameSet
=
new
HashSet
<>();
Set
<
String
>
roleNameSet
=
new
HashSet
<>();
List
<
RoleModel
>
userRoleList
=
new
ArrayList
<>();
List
<
RoleModel
>
userRoleList
=
new
ArrayList
<>();
List
<
Long
>
roleIds
=
new
ArrayList
<>();
List
<
Long
>
roleIds
=
new
ArrayList
<>();
...
@@ -104,7 +106,24 @@ public class WelderServiceImpl {
...
@@ -104,7 +106,24 @@ public class WelderServiceImpl {
agencyUserModel
.
setRePassword
(
DesUtil
.
encode
(
jsonObject
.
getString
(
"phone"
),
secretKey
));
agencyUserModel
.
setRePassword
(
DesUtil
.
encode
(
jsonObject
.
getString
(
"phone"
),
secretKey
));
//用户角色信息
//用户角色信息
List
<
RoleModel
>
allRoleList
=
Privilege
.
roleClient
.
queryRoleList
(
null
,
null
).
getResult
();
List
<
RoleModel
>
allRoleList
=
Privilege
.
roleClient
.
queryRoleList
(
null
,
null
).
getResult
();
roleNameSet
.
add
(
OrgEnum
.
普通人员
.
getName
());
if
(
orgexpand
.
equals
(
OrgEnum
.
安装单位
.
getKey
())){
if
(
jsonObject
.
getString
(
"isWelder"
).
equals
(
"1"
)){
roleNameSet
.
add
(
OrgEnum
.
普通人员
.
getName
());
}
else
{
roleNameSet
.
add
(
OrgEnum
.
安装单位
.
getName
());
}
}
else
if
(
orgexpand
.
equals
(
OrgEnum
.
建设单位
.
getKey
())){
roleNameSet
.
add
(
OrgEnum
.
建设单位
.
getName
());
}
else
if
(
orgexpand
.
equals
(
OrgEnum
.
监察部门
.
getKey
())){
roleNameSet
.
add
(
OrgEnum
.
监察部门
.
getName
());
}
else
if
(
orgexpand
.
equals
(
OrgEnum
.
监检机构
.
getKey
())){
roleNameSet
.
add
(
OrgEnum
.
监检机构
.
getName
());
}
else
if
(
orgexpand
.
equals
(
OrgEnum
.
设计单位
.
getKey
())){
roleNameSet
.
add
(
OrgEnum
.
设计单位
.
getName
());
}
//给登录人身份配置
//给登录人身份配置
userRoleList
=
allRoleList
.
stream
().
filter
(
r
->
{
userRoleList
=
allRoleList
.
stream
().
filter
(
r
->
{
...
...
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