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
1b06b1ee
Commit
1b06b1ee
authored
Aug 11, 2025
by
hcing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
27e184c9
475d6f65
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
357 additions
and
82 deletions
+357
-82
JgUseRegistrationMapper.java
...os/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
+13
-0
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+287
-0
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+15
-1
InspectionEquipInfoModel.java
.../boot/module/jyjc/api/model/InspectionEquipInfoModel.java
+3
-0
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+18
-63
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+2
-2
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+19
-16
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
View file @
1b06b1ee
...
...
@@ -29,6 +29,19 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
@Param
(
"roleIds"
)
List
<
String
>
roleIds
,
@Param
(
"client"
)
String
client
);
List
<
Map
<
String
,
Object
>>
getListPage1
(
@Param
(
"size"
)
Long
size
,
@Param
(
"offset"
)
Long
offset
,
@Param
(
"sort"
)
SortVo
sortMap
,
@Param
(
"dto"
)
JgUseRegistrationDto
dto
,
@Param
(
"roleIds"
)
List
<
String
>
roleIds
,
@Param
(
"client"
)
String
client
);
Long
getListPageCount
(
@Param
(
"sort"
)
SortVo
sortMap
,
@Param
(
"dto"
)
JgUseRegistrationDto
dto
,
@Param
(
"roleIds"
)
List
<
String
>
roleIds
,
@Param
(
"client"
)
String
client
);
List
<
RegistrationVo
>
queryRegistrationInIds
(
@Param
(
"dto"
)
JgUseRegistrationDto
dto
,
@Param
(
"client"
)
String
client
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
1b06b1ee
...
...
@@ -379,6 +379,293 @@
</choose>
</select>
<select
id=
"getListPage1"
resultType=
"java.util.Map"
>
WITH filtered_ur AS (
SELECT
sequence_nbr,
audit_status,
reg_date,
use_unit_name,
supervision_org_code,
status,
receive_org_name,
use_address,
instance_id,
apply_no,
next_execute_ids,
promoter,
use_registration_code,
audit_pass_date,
create_date,
next_execute_user_ids,
next_task_id,
create_user_id,
rec_date,
manage_type,
reg_type,
is_delete,
receive_company_code,
use_unit_credit_code,
transfer_to_user_ids,
cancel_reason,
project_contraption_id
FROM tzs_jg_use_registration
WHERE is_delete = 0
AND supervision_org_code LIKE CONCAT(#{dto.supervisionOrgCode}, '%')
AND status
<![CDATA[<>]]>
'使用单位待提交'
<!-- 公共主表过滤条件 -->
<if
test=
"dto.status != null and dto.status != ''"
>
AND status = #{dto.status}
</if>
<if
test=
"dto.applicationDate != null"
>
AND create_date LIKE CONCAT('%', DATE_FORMAT(#{dto.applicationDate}, '%Y-%m-%d'), '%')
</if>
<if
test=
"dto.fullAddress != null and dto.fullAddress != ''"
>
AND use_address LIKE CONCAT('%', #{dto.fullAddress}, '%')
</if>
<if
test=
"dto.useUnitName != null and dto.useUnitName != ''"
>
AND use_unit_name LIKE CONCAT('%', #{dto.useUnitName}, '%')
</if>
<if
test=
"dto.applyNo != null and dto.applyNo != ''"
>
AND apply_no LIKE CONCAT('%', #{dto.applyNo}, '%')
</if>
<if
test=
"dto.useRegistrationCode != null and dto.useRegistrationCode != ''"
>
AND use_registration_code LIKE CONCAT('%', #{dto.useRegistrationCode}, '%')
</if>
<if
test=
"dto.useUnitCode != null and dto.useUnitCode != ''"
>
AND use_unit_credit_code = #{dto.useUnitCode}
</if>
<if
test=
"dto.orgBranchCode != null and dto.orgBranchCode != ''"
>
<choose>
<when
test=
"client == 'jgLook'"
>
AND supervision_org_code LIKE CONCAT(#{dto.orgBranchCode}, '%')
</when>
<otherwise>
AND supervision_org_code = #{dto.orgBranchCode}
</otherwise>
</choose>
</if>
<if
test=
"dto.auditPassDateStart != null and dto.auditPassDateEnd != null"
>
AND audit_pass_date BETWEEN #{dto.auditPassDateStart} AND #{dto.auditPassDateEnd}
</if>
<if
test=
"dto.dataType == 'supervision' "
>
<choose>
<when
test=
"client == 'jgAudit'"
>
AND (receive_company_code = #{dto.receiveCompanyCode}
OR transfer_to_user_ids LIKE CONCAT('%', #{dto.currentUserId}, '%'))
</when>
<otherwise>
AND supervision_org_code LIKE CONCAT(#{dto.supervisionOrgCode}, '%')
</otherwise>
</choose>
</if>
<if
test=
"dto.dataType == 'company' "
>
AND (use_unit_credit_code = #{dto.unitCode}
OR transfer_to_user_ids LIKE CONCAT('%', #{dto.currentUserId}, '%'))
</if>
ORDER BY
<choose>
<when
test=
"sort != null"
>
${sort.field} ${sort.sortType}
</when>
<otherwise>
create_date DESC, apply_no DESC
</otherwise>
</choose>
LIMIT #{size} OFFSET #{offset}
),
equipment_data AS (
SELECT
re.equip_transfer_id,
GROUP_CONCAT(re.equ_id) AS equipId,
GROUP_CONCAT(DISTINCT other.supervisory_code) AS supervisoryCode,
GROUP_CONCAT(DISTINCT other.CODE96333) AS code96333,
GROUP_CONCAT(jri.PRODUCT_NAME) AS productName,
GROUP_CONCAT(DISTINCT jri.EQU_CODE) AS equCode,
GROUP_CONCAT(DISTINCT jri.EQU_LIST) AS equListCode,
GROUP_CONCAT(DISTINCT jri.EQU_CATEGORY) AS equCategoryCode,
GROUP_CONCAT(DISTINCT jri.EQU_DEFINE) AS equDefineCode,
GROUP_CONCAT(DISTINCT c_list.name) AS equListName,
GROUP_CONCAT(DISTINCT c_cate.name) AS equCategory,
GROUP_CONCAT(DISTINCT c_def.name) AS equDefine
FROM filtered_ur fu
JOIN tzs_jg_use_registration_eq re ON fu.sequence_nbr = re.equip_transfer_id
JOIN idx_biz_jg_register_info jri ON re.equ_id = jri.RECORD
LEFT JOIN idx_biz_jg_other_info other ON jri.RECORD = other.RECORD
LEFT JOIN tz_equipment_category c_list ON jri.EQU_LIST = c_list.code
LEFT JOIN tz_equipment_category c_cate ON jri.EQU_CATEGORY = c_cate.code
LEFT JOIN tz_equipment_category c_def ON jri.EQU_DEFINE = c_def.code
<where>
<!-- 统一设备过滤条件 -->
<if
test=
"dto.equList != null and dto.equList != ''"
>
AND jri.EQU_LIST = #{dto.equList}
</if>
<if
test=
"dto.equCategory != null and dto.equCategory != ''"
>
AND jri.EQU_CATEGORY = #{dto.equCategory}
</if>
<if
test=
"dto.equDefine != null and dto.equDefine != ''"
>
AND jri.EQU_DEFINE = #{dto.equDefine}
</if>
</where>
GROUP BY re.equip_transfer_id
)
SELECT
fu.sequence_nbr AS sequenceNbr,
fu.audit_status AS auditStatus,
DATE_FORMAT(fu.reg_date,'%Y-%m-%d') AS regDate,
fu.use_unit_name AS useUnitName,
fu.supervision_org_code AS supervisionOrgCode,
fu.status,
fu.receive_org_name AS receiveOrgName,
fu.use_address AS place,
fu.instance_id AS instanceId,
fu.apply_no AS applyNo,
fu.next_execute_ids AS nextExecuteIds,
fu.promoter,
fu.use_registration_code AS useRegistrationCode,
DATE_FORMAT(fu.audit_pass_date,'%Y-%m-%d') AS auditPassDate,
DATE_FORMAT(fu.create_date,'%Y-%m-%d') AS createDate,
fu.receive_org_name AS receiveOrgName,
fu.next_execute_user_ids AS nextExecuteUserIds,
fu.next_task_id AS nextTaskId,
fu.create_user_id AS createUserId,
fu.rec_date AS recDate,
fu.manage_type AS manageType,
fu.reg_type AS regType,
fu.is_delete,
fu.create_date,
fu.receive_company_code,
fu.use_unit_credit_code,
fu.transfer_to_user_ids,
fu.supervision_org_code,
fu.use_address AS fullAddress,
fu.cancel_reason AS cancelReason,
fu.project_contraption_id AS projectContraptionId,
<!-- 设备字段 -->
COALESCE(ed.equipId, '') AS equipId,
COALESCE(ed.supervisoryCode, '') AS supervisoryCode,
COALESCE(ed.code96333, '') AS code96333,
COALESCE(ed.productName, '') AS productName,
COALESCE(ed.equCode, '') AS equCode,
COALESCE(ed.equListCode, '') AS equListCode,
COALESCE(ed.equCategoryCode, '') AS equCategoryCode,
COALESCE(ed.equDefineCode, '') AS equDefineCode,
COALESCE(ed.equListName, '') AS equListName,
COALESCE(ed.equCategory, '') AS equCategory,
COALESCE(ed.equDefine, '') AS equDefine
FROM filtered_ur fu
LEFT JOIN equipment_data ed ON fu.sequence_nbr = ed.equip_transfer_id
WHERE 1=1
<!-- 设备代码过滤 -->
<if
test=
"dto.equCode != null and dto.equCode != ''"
>
AND ed.equCode LIKE CONCAT('%', #{dto.equCode}, '%')
</if>
<!-- 96333码过滤 -->
<if
test=
"dto.code96333 != null and dto.code96333 != ''"
>
AND ed.code96333 LIKE CONCAT('%', #{dto.code96333}, '%')
</if>
<!-- 监管码过滤 -->
<if
test=
"dto.supervisoryCode != null and dto.supervisoryCode != ''"
>
AND ed.supervisoryCode LIKE CONCAT('%', #{dto.supervisoryCode}, '%')
</if>
ORDER BY
<choose>
<when
test=
"sort != null"
>
${sort.field} ${sort.sortType}
</when>
<otherwise>
fu.create_date DESC, fu.apply_no DESC
</otherwise>
</choose>
</select>
<select
id=
"getListPageCount"
resultType=
"java.lang.Long"
>
SELECT
<![CDATA[/*+ set(query_dop 16)*/]]>
COUNT(DISTINCT ur.sequence_nbr)
FROM tzs_jg_use_registration ur
LEFT JOIN tzs_jg_use_registration_eq re ON ur.sequence_nbr = re.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info jri ON re.equ_id = jri.RECORD
WHERE ur.is_delete = 0
AND ur.supervision_org_code LIKE CONCAT(#{dto.supervisionOrgCode}, '%')
AND ur.status
<![CDATA[<>]]>
'使用单位待提交'
<!-- 统一设备过滤条件 -->
<if
test=
"dto.equList != null and dto.equList != ''"
>
AND jri.EQU_LIST = #{dto.equList}
</if>
<if
test=
"dto.equCategory != null and dto.equCategory != ''"
>
AND jri.EQU_CATEGORY = #{dto.equCategory}
</if>
<if
test=
"dto.equDefine != null and dto.equDefine != ''"
>
AND jri.EQU_DEFINE = #{dto.equDefine}
</if>
<!-- 设备代码过滤 -->
<if
test=
"dto.equCode != null and dto.equCode != ''"
>
AND equCode LIKE CONCAT('%', #{dto.equCode}, '%')
</if>
<!-- 96333码过滤 -->
<if
test=
"dto.code96333 != null and dto.code96333 != ''"
>
AND code96333 LIKE CONCAT('%', #{dto.code96333}, '%')
</if>
<!-- 监管码过滤 -->
<if
test=
"dto.supervisoryCode != null and dto.supervisoryCode != ''"
>
AND supervisoryCode LIKE CONCAT('%', #{dto.supervisoryCode}, '%')
</if>
<if
test=
"dto.status != null and dto.status != ''"
>
AND status = #{dto.status}
</if>
<if
test=
"dto.applicationDate != null"
>
AND create_date LIKE CONCAT('%', DATE_FORMAT(#{dto.applicationDate}, '%Y-%m-%d'), '%')
</if>
<if
test=
"dto.fullAddress != null and dto.fullAddress != ''"
>
AND use_address LIKE CONCAT('%', #{dto.fullAddress}, '%')
</if>
<if
test=
"dto.useUnitName != null and dto.useUnitName != ''"
>
AND use_unit_name LIKE CONCAT('%', #{dto.useUnitName}, '%')
</if>
<if
test=
"dto.applyNo != null and dto.applyNo != ''"
>
AND apply_no LIKE CONCAT('%', #{dto.applyNo}, '%')
</if>
<if
test=
"dto.useRegistrationCode != null and dto.useRegistrationCode != ''"
>
AND use_registration_code LIKE CONCAT('%', #{dto.useRegistrationCode}, '%')
</if>
<if
test=
"dto.useUnitCode != null and dto.useUnitCode != ''"
>
AND use_unit_credit_code = #{dto.useUnitCode}
</if>
<if
test=
"dto.orgBranchCode != null and dto.orgBranchCode != ''"
>
<choose>
<when
test=
"client == 'jgLook'"
>
AND supervision_org_code LIKE CONCAT(#{dto.orgBranchCode}, '%')
</when>
<otherwise>
AND supervision_org_code = #{dto.orgBranchCode}
</otherwise>
</choose>
</if>
<if
test=
"dto.auditPassDateStart != null and dto.auditPassDateEnd != null"
>
AND audit_pass_date BETWEEN #{dto.auditPassDateStart} AND #{dto.auditPassDateEnd}
</if>
<if
test=
"dto.dataType == 'supervision' "
>
<choose>
<when
test=
"client == 'jgAudit'"
>
AND (receive_company_code = #{dto.receiveCompanyCode}
OR transfer_to_user_ids LIKE CONCAT('%', #{dto.currentUserId}, '%'))
</when>
<otherwise>
AND supervision_org_code LIKE CONCAT(#{dto.supervisionOrgCode}, '%')
</otherwise>
</choose>
</if>
<if
test=
"dto.dataType == 'company' "
>
AND (use_unit_credit_code = #{dto.unitCode}
OR transfer_to_user_ids LIKE CONCAT('%', #{dto.currentUserId}, '%'))
</if>
</select>
<select
id=
"queryRegistrationInIds"
resultType=
"com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo.RegistrationVo"
>
select
*
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
View file @
1b06b1ee
...
...
@@ -78,6 +78,8 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.compress.utils.Lists
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.redisson.api.RLock
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -139,6 +141,8 @@ import static java.util.stream.Collectors.toSet;
@Getter
public
class
JgUseRegistrationServiceImpl
extends
BaseService
<
JgUseRegistrationDto
,
JgUseRegistration
,
JgUseRegistrationMapper
>
implements
IJgUseRegistrationService
,
ICompensateFlowDataOfRedis
<
JgUseRegistration
>,
ApplicationContextAware
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
JgUseRegistrationServiceImpl
.
class
);
private
static
final
String
DEFINITION_KEY
=
"useRegistration"
;
private
static
final
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);;
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
);
...
...
@@ -349,7 +353,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgUseRegistrationDto
dto
,
String
sort
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
,
String
client
)
{
SortVo
sortMap
=
commonServiceImpl
.
sortFieldConversionNoToUnderline
(
sort
);
return
this
.
baseMapper
.
getListPage
(
page
,
sortMap
,
dto
,
roleIds
,
client
);
// 统计查询时间
long
startTime
=
System
.
currentTimeMillis
();
logger
.
info
(
"使用登记单据-列表查询"
);
List
<
Map
<
String
,
Object
>>
resultRecords
=
this
.
baseMapper
.
getListPage1
(
page
.
getSize
(),
page
.
getSize
()
*
(
page
.
getCurrent
()
-
1
),
sortMap
,
dto
,
roleIds
,
client
);
logger
.
info
(
"使用登记单据-列表查询耗时:{}毫秒"
,
(
System
.
currentTimeMillis
()
-
startTime
));
page
.
setRecords
(
resultRecords
);
logger
.
info
(
"使用登记单据-列表总数查询"
);
startTime
=
System
.
currentTimeMillis
();
page
.
setTotal
(
this
.
baseMapper
.
getListPageCount
(
sortMap
,
dto
,
roleIds
,
client
));
logger
.
info
(
"使用登记单据-列表总数查询耗时:{}毫秒"
,
(
System
.
currentTimeMillis
()
-
startTime
));
return
page
;
}
public
Page
<
Map
<
String
,
Object
>>
getEquipList
(
Page
<
Map
<
String
,
Object
>>
page
,
String
factoryNum
,
String
equList
,
String
equCategory
)
{
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/InspectionEquipInfoModel.java
View file @
1b06b1ee
...
...
@@ -40,4 +40,7 @@ public class InspectionEquipInfoModel implements Serializable {
@ApiModelProperty
(
value
=
"主题,无需上送,由topic解析出来"
)
private
String
componentKey
;
@ApiModelProperty
(
value
=
"申请报检单位信用代码"
)
private
String
unitCode
;
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionApplicationServiceImpl.java
View file @
1b06b1ee
...
...
@@ -77,6 +77,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
...
...
@@ -105,8 +106,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
private
static
final
String
EQU_CODE
=
"EQU_CODE"
;
private
static
final
String
SEQUENCE_NBR
=
"SEQUENCE_NBR"
;
private
static
final
String
SUMMIT_TYPE
=
"0"
;
private
static
final
String
FIRST_INSPECT
=
"firstInspect"
;
private
static
final
String
SUPERVISE
=
"supervise"
;
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
@Autowired
...
...
@@ -158,17 +157,10 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
private
RedisUtils
redisUtils
;
@Autowired
private
ESEquipmentCategory
esEquipmentCategory
;
@Autowired
private
IdxBizJgProjectContraptionMapper
idxBizJgProjectContraptionMapper
;
@Autowired
private
IdxBizJgProjectConstructionMapper
idxBizJgProjectConstructionMapper
;
@Autowired
private
JyjcInspectionResultParamServiceImpl
jyjcInspectionResultParamServiceImpl
;
@Resource
private
SnowflakeIdUtil
sequence
;
...
...
@@ -250,18 +242,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
setNameAndIsMustAccept
(
model
);
}
LambdaQueryWrapper
<
JyjcOpeningApplication
>
wa
=
new
LambdaQueryWrapper
<
JyjcOpeningApplication
>().
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
model
.
getInspectionUnitCode
()).
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
List
<
JyjcOpeningApplication
>
jyjcOpeningApplications
=
jyjcOpeningApplicationService
.
getBaseMapper
().
selectList
(
wa
);
if
(
CollectionUtils
.
isNotEmpty
(
jyjcOpeningApplications
))
{
//检验检测结果方式
if
(
jyjcOpeningApplications
.
get
(
0
).
getResultType
()
!=
null
)
{
model
.
setResultType
(
jyjcOpeningApplications
.
get
(
0
).
getResultType
());
// 报检时冗余检验检测机构厂商编号,推送厂商报检信息时需要
model
.
setDockingUnitCode
(
jyjcOpeningApplications
.
get
(
0
).
getDockingUnitCode
());
}
}
this
.
setResultTypeAndDockInfo
(
model
);
model
.
setApplicationDate
(
new
Date
());
model
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
model
.
setApplicationUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
...
...
@@ -339,16 +320,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
else
{
// 保存并提交
LambdaQueryWrapper
<
JyjcOpeningApplication
>
wa
=
new
LambdaQueryWrapper
<
JyjcOpeningApplication
>().
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
model
.
getInspectionUnitCode
()).
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
List
<
JyjcOpeningApplication
>
jyjcOpeningApplications
=
jyjcOpeningApplicationService
.
getBaseMapper
().
selectList
(
wa
);
if
(
CollectionUtils
.
isNotEmpty
(
jyjcOpeningApplications
))
{
//检验检测结果方式
if
(
jyjcOpeningApplications
.
get
(
0
).
getResultType
()
!=
null
)
{
model
.
setResultType
(
jyjcOpeningApplications
.
get
(
0
).
getResultType
());
// 报检时冗余检验检测机构厂商编号,推送厂商报检信息时需要
model
.
setDockingUnitCode
(
jyjcOpeningApplications
.
get
(
0
).
getDockingUnitCode
());
}
}
this
.
setResultTypeAndDockInfo
(
model
);
this
.
setNameAndIsMustAccept
(
model
);
jyjcInspectionApplicationEquipService
.
getBaseMapper
().
deleteByApplicationSeq
(
model
.
getSequenceNbr
());
if
(!
model
.
getEquip
().
isEmpty
())
{
...
...
@@ -515,7 +487,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
jyjcInspectionApplicationPushLogService
.
getBaseMapper
().
deleteByApplicationSeq
(
seq
);
}
return
true
;
}
public
Page
<
JyjcInspectionApplicationEquipModel
>
listByCategory
(
Page
<
JyjcInspectionApplicationEquipModel
>
page
,
String
equipClassify
)
{
...
...
@@ -778,7 +749,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
resultModel
.
setSequenceNbr
(
resultSeq
);
resultModel
.
setIsExistNc
(
false
);
resultModel
.
setManageType
(
"batch"
);
this
.
setResultTypeByBizTypeV2
(
resultModel
,
model
.
getBiz
Type
());
resultModel
.
setResultType
(
model
.
getResult
Type
());
resultModels
.
add
(
resultModel
);
// TODO 以管道汇总样式表暂存json,在结果录入后,将数据更新技术参数,考虑老数据
Map
<
String
,
Object
>
paramDetail
=
getDeviceListByProjectContraption3
(
model
);
...
...
@@ -812,7 +783,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
resultModel
.
setEquCategory
(
applicationEquipModels
.
get
(
i
).
getEquCategory
());
resultModel
.
setEquList
(
applicationEquipModels
.
get
(
i
).
getEquList
());
resultModel
.
setIsExistNc
(
false
);
this
.
setResultTypeByBizTypeV2
(
resultModel
,
model
.
getBiz
Type
());
resultModel
.
setResultType
(
model
.
getResult
Type
());
Long
resultSeq
=
sequence
.
nextId
();
resultModel
.
setSequenceNbr
(
resultSeq
);
resultModels
.
add
(
resultModel
);
...
...
@@ -841,8 +812,20 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
private
void
setResultTypeByBizTypeV2
(
JyjcInspectionResult
resultModel
,
String
bizType
)
{
private
void
setResultTypeAndDockInfo
(
JyjcInspectionApplicationModel
applicationModel
)
{
LambdaQueryWrapper
<
JyjcOpeningApplication
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
applicationModel
.
getInspectionUnitCode
());
queryWrapper
.
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
queryWrapper
.
select
(
JyjcOpeningApplication:
:
getResultType
,
BaseEntity:
:
getSequenceNbr
);
queryWrapper
.
orderByDesc
(
JyjcOpeningApplication:
:
getAcceptDate
);
queryWrapper
.
last
(
"limit 1"
);
List
<
JyjcOpeningApplication
>
applicationList
=
jyjcOpeningApplicationService
.
list
(
queryWrapper
);
if
(!
applicationList
.
isEmpty
())
{
applicationModel
.
setResultType
(
applicationList
.
get
(
0
).
getResultType
());
applicationModel
.
setDockingUnitCode
(
applicationList
.
get
(
0
).
getDockingUnitCode
());
}
}
public
void
createHisAfterReceive
(
JyjcInspectionApplicationModel
model
)
{
if
(
model
.
getEquipClassify
().
equals
(
EquipmentClassifityEnum
.
YLGD
.
getCode
()))
{
...
...
@@ -865,34 +848,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
private
void
setResultTypeByBizType
(
JyjcInspectionResult
resultModel
,
String
bizType
)
{
// 由于一个检验检测单位可以申请开通检验、检测两个申请,即确定一个 开通申请的维度为:单位编码 + 开通业务类型
// 但是表里面放的使用单位的公司编码,导致无法匹配到正确的开通申请,故按照单位编码+ 开通类型 + 状态查询开通申请
BizTypeEnum
bizTypeEnum
=
BizTypeEnum
.
getInstance
(
bizType
);
String
openBizType
=
""
;
assert
bizTypeEnum
!=
null
;
switch
(
bizTypeEnum
)
{
case
SUPERVISE:
case
FIRST_INSPECTION:
openBizType
=
OpenBizTypeEnum
.
JY
.
getCode
();
break
;
case
DETECTION:
openBizType
=
OpenBizTypeEnum
.
JC
.
getCode
();
break
;
default
:
break
;
}
LambdaQueryWrapper
<
JyjcOpeningApplication
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
resultModel
.
getInspectionUnitCode
());
queryWrapper
.
eq
(
JyjcOpeningApplication:
:
getOpenBizType
,
openBizType
);
queryWrapper
.
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
queryWrapper
.
select
(
JyjcOpeningApplication:
:
getResultType
);
List
<
JyjcOpeningApplication
>
applicationList
=
jyjcOpeningApplicationService
.
list
(
queryWrapper
);
if
(!
applicationList
.
isEmpty
())
{
resultModel
.
setResultType
(
applicationList
.
get
(
0
).
getResultType
());
}
}
private
void
pushInspectionApplication
(
JyjcInspectionApplicationModel
inspectionApplicationModel
)
{
// 将检验检测申请信息推送至对应的检验机构
if
(
inspectionApplicationModel
.
getResultType
().
equals
(
ResultTypeEnum
.
INTEGRATED
.
getCode
()))
{
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/TzsUserInfoController.java
View file @
1b06b1ee
...
...
@@ -511,8 +511,8 @@ public class TzsUserInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/refreshUserGroupInfo"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"同步人员信息"
,
notes
=
"同步人员信息"
)
public
ResponseModel
<
TzsUserInfoDto
>
refreshUserInfo
(
@RequestBody
List
<
String
>
userIds
)
{
tzsUserInfoServiceImpl
.
refreshUserGroupInfo
(
userIds
);
public
ResponseModel
<
TzsUserInfoDto
>
refreshUserInfo
(
@RequestBody
List
<
String
>
userIds
,
@RequestParam
(
required
=
false
)
boolean
refreshNonAdmin
)
{
tzsUserInfoServiceImpl
.
refreshUserGroupInfo
(
userIds
,
refreshNonAdmin
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
View file @
1b06b1ee
...
...
@@ -2520,19 +2520,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
}
public
void
refreshAdminUserRole
(
List
<
TzsUserInfo
>
userInfos
,
List
<
String
>
userId
)
{
List
<
String
>
adminUserIdList
;
if
(
ValidationUtil
.
isEmpty
(
userInfos
))
{
adminUserIdList
=
userId
;
}
else
{
List
<
String
>
amosUserIdList
=
userInfos
.
stream
().
map
(
TzsUserInfo:
:
getAmosUserId
).
collect
(
Collectors
.
toList
());
adminUserIdList
=
userId
.
stream
().
filter
(
id
->
!
amosUserIdList
.
contains
(
id
)).
collect
(
Collectors
.
toList
());
}
if
(
ValidationUtil
.
isEmpty
(
adminUserIdList
))
{
return
;
}
List
<
RegUnitInfo
>
regUnitInfos
=
regUnitInfoService
.
lambdaQuery
().
in
(
RegUnitInfo:
:
getAdminUserId
,
adminUserIdList
).
list
();
public
void
refreshAdminUserRole
(
List
<
RegUnitInfo
>
regUnitInfos
)
{
List
<
String
>
useUnitCodes
=
regUnitInfos
.
stream
().
map
(
RegUnitInfo:
:
getUnitCode
).
collect
(
Collectors
.
toList
());
if
(
ValidationUtil
.
isEmpty
(
useUnitCodes
))
{
return
;
...
...
@@ -2584,14 +2572,29 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
}
public
void
refreshUserGroupInfo
(
List
<
String
>
userId
)
{
public
void
refreshUserGroupInfo
(
List
<
String
>
userId
,
boolean
refreshNonAdmin
)
{
if
(
ObjectUtils
.
isEmpty
(
userId
))
{
return
;
}
List
<
RegUnitInfo
>
adminRegUnitInfos
=
regUnitInfoService
.
lambdaQuery
().
in
(
RegUnitInfo:
:
getAdminUserId
,
userId
).
list
();
refreshAdminUserRole
(
adminRegUnitInfos
);
if
(!
refreshNonAdmin
)
{
return
;
}
List
<
String
>
amosAdminUserIdList
=
adminRegUnitInfos
.
stream
().
map
(
RegUnitInfo:
:
getAdminUserId
).
collect
(
Collectors
.
toList
());
userId
=
userId
.
stream
().
filter
(
id
->
!
amosAdminUserIdList
.
contains
(
id
)).
collect
(
Collectors
.
toList
());
if
(
ObjectUtils
.
isEmpty
(
userId
))
{
return
;
}
// 根据userId获取用户
List
<
TzsUserInfo
>
userInfos
=
tzsUserInfoMapper
.
selectList
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
.
in
(
TzsUserInfo:
:
getAmosUserId
,
userId
));
refreshAdminUserRole
(
userInfos
,
userId
);
.
in
(
TzsUserInfo:
:
getAmosUserId
,
userId
).
eq
(
TzsUserInfo:
:
getIsDelete
,
false
));
if
(
ObjectUtils
.
isEmpty
(
userInfos
))
{
return
;
}
...
...
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