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
c145de89
Commit
c145de89
authored
Jan 18, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检验检测检验结果数据权限按钮控制显示隐藏调整
parent
b6c73526
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
17 deletions
+17
-17
JyjcInspectionResultMapper.xml
.../src/main/resources/mapper/JyjcInspectionResultMapper.xml
+3
-0
JyjcInspectionResultServiceImpl.java
...yjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
+11
-14
UseInfoMapper.xml
...odule-ymt-api/src/main/resources/mapper/UseInfoMapper.xml
+3
-3
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcInspectionResultMapper.xml
View file @
c145de89
...
@@ -109,6 +109,9 @@
...
@@ -109,6 +109,9 @@
<if
test=
"jyjcInspectionResultModel.useUnitCreditCode != '' and jyjcInspectionResultModel.useUnitCreditCode != null"
>
<if
test=
"jyjcInspectionResultModel.useUnitCreditCode != '' and jyjcInspectionResultModel.useUnitCreditCode != null"
>
and use_unit_credit_code like concat('%',#{jyjcInspectionResultModel.useUnitCreditCode},'%')
and use_unit_credit_code like concat('%',#{jyjcInspectionResultModel.useUnitCreditCode},'%')
</if>
</if>
<if
test=
"jyjcInspectionResultModel.inspectionUnitCode != '' and jyjcInspectionResultModel.inspectionUnitCode != null"
>
and res.inspection_unit_code = #{jyjcInspectionResultModel.inspectionUnitCode}
</if>
<choose>
<choose>
<when
test=
"identity == 'apply'"
>
<when
test=
"identity == 'apply'"
>
and res.application_unit_code = #{jyjcInspectionResultModel.companyCode}
and res.application_unit_code = #{jyjcInspectionResultModel.companyCode}
...
...
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/JyjcInspectionResultServiceImpl.java
View file @
c145de89
...
@@ -4,13 +4,11 @@ import cn.hutool.core.bean.BeanUtil;
...
@@ -4,13 +4,11 @@ import cn.hutool.core.bean.BeanUtil;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONPObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jyjc.api.common.StringUtil
;
import
com.yeejoin.amos.boot.module.jyjc.api.common.StringUtil
;
...
@@ -24,7 +22,6 @@ import com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultAttach
...
@@ -24,7 +22,6 @@ import com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultAttach
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultParamService
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultParamService
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultService
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultService
;
import
com.yeejoin.amos.boot.module.jyjc.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.jyjc.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.CategoryOtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
...
@@ -127,7 +124,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -127,7 +124,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
model
=
new
JyjcInspectionResultModel
();
model
=
new
JyjcInspectionResultModel
();
}
}
// 判断当前登录人身份(报检机构、接收机构、即时报检又是接收机构、都不是(不存在此情况))
// 判断当前登录人身份(报检机构、接收机构、即时报检又是接收机构、都不是(不存在此情况))
String
identity
=
this
.
getCompanyIdentityByType
(
reginParams
.
getCompany
().
getCompanyType
());
String
identity
=
this
.
getCompanyIdentityByType
(
reginParams
.
getCompany
().
getCompanyType
());
model
.
setCompanyCode
(
reginParams
.
getCompany
().
getCompanyCode
());
model
.
setCompanyCode
(
reginParams
.
getCompany
().
getCompanyCode
());
Page
<
JyjcInspectionResultModel
>
resultPage
=
resultMapper
.
selectForPage
(
page
,
model
,
identity
);
Page
<
JyjcInspectionResultModel
>
resultPage
=
resultMapper
.
selectForPage
(
page
,
model
,
identity
);
resultPage
.
getRecords
().
forEach
(
v
->
{
resultPage
.
getRecords
().
forEach
(
v
->
{
...
@@ -142,27 +139,27 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -142,27 +139,27 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
return
resultPage
;
return
resultPage
;
}
}
private
String
getCompanyIdentityByType
(
String
companyType
){
private
String
getCompanyIdentityByType
(
String
companyType
)
{
// 可发起单位的单位类型(角色与单位类型已绑定,在业务系统增加的账号不会出现角色与的单位类型不匹配场景)
// 可发起单位的单位类型(角色与单位类型已绑定,在业务系统增加的账号不会出现角色与的单位类型不匹配场景)
String
[]
applyIdentityDefine
=
{
"使用单位"
,
"安装改造维修单位"
};
String
[]
applyIdentityDefine
=
{
"使用单位"
,
"安装改造维修单位"
};
// 可进行检验检测申请接收的单位类型,在业务系统增加的账号不会出现角色与的单位类型不匹配场景
// 可进行检验检测申请接收的单位类型,在业务系统增加的账号不会出现角色与的单位类型不匹配场景
String
[]
receiveIdentityDefine
=
{
"检验检测机构"
};
String
[]
receiveIdentityDefine
=
{
"检验检测机构"
};
boolean
isApplyIdentityMatch
=
false
;
boolean
isApplyIdentityMatch
=
false
;
boolean
isReceiveIdentityMatch
=
false
;
boolean
isReceiveIdentityMatch
=
false
;
if
(
Arrays
.
stream
(
applyIdentityDefine
).
anyMatch
(
companyType:
:
contains
))
{
if
(
Arrays
.
stream
(
applyIdentityDefine
).
anyMatch
(
companyType:
:
contains
))
{
isApplyIdentityMatch
=
true
;
isApplyIdentityMatch
=
true
;
}
}
if
(
Arrays
.
stream
(
receiveIdentityDefine
).
anyMatch
(
companyType:
:
contains
))
{
if
(
Arrays
.
stream
(
receiveIdentityDefine
).
anyMatch
(
companyType:
:
contains
))
{
isReceiveIdentityMatch
=
true
;
isReceiveIdentityMatch
=
true
;
}
}
if
(
isApplyIdentityMatch
&&
!
isReceiveIdentityMatch
)
{
if
(
isApplyIdentityMatch
&&
!
isReceiveIdentityMatch
)
{
return
"apply"
;
return
"apply"
;
}
}
if
(!
isApplyIdentityMatch
&&
isReceiveIdentityMatch
)
{
if
(!
isApplyIdentityMatch
&&
isReceiveIdentityMatch
)
{
return
"receive"
;
return
"receive"
;
}
}
if
(
isApplyIdentityMatch
)
{
if
(
isApplyIdentityMatch
)
{
return
"all"
;
return
"all"
;
}
}
return
"no"
;
return
"no"
;
}
}
...
@@ -235,7 +232,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -235,7 +232,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
paramList
.
add
(
resultParam
);
paramList
.
add
(
resultParam
);
}
}
});
});
if
(!
CollectionUtils
.
isEmpty
(
paramList
)){
if
(!
CollectionUtils
.
isEmpty
(
paramList
))
{
resultParamService
.
saveOrUpdateBatch
(
paramList
);
resultParamService
.
saveOrUpdateBatch
(
paramList
);
}
}
...
@@ -254,11 +251,11 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -254,11 +251,11 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
inspectionDetectionInfoMapper
.
updateById
(
info
);
inspectionDetectionInfoMapper
.
updateById
(
info
);
}
}
//更新使用信息表
//更新使用信息表
useInfoMapper
.
updateByRecord
(
model
.
getEquipUnicode
(),
model
.
getNextInspectionDate
(),
model
.
getInspectionType
(),
model
.
getApplicationNo
());
useInfoMapper
.
updateByRecord
(
model
.
getEquipUnicode
(),
model
.
getNextInspectionDate
(),
model
.
getInspectionType
(),
model
.
getApplicationNo
());
return
model
;
return
model
;
}
}
private
void
extracted
(
JyjcInspectionResultModel
model
,
InspectionDetectionInfo
info
,
JyjcInspectionResultAttachment
jybgFile
)
{
private
void
extracted
(
JyjcInspectionResultModel
model
,
InspectionDetectionInfo
info
,
JyjcInspectionResultAttachment
jybgFile
)
{
// 回填检验机构名称
// 回填检验机构名称
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
TzBaseEnterpriseInfo:
:
getUseCode
,
model
.
getInspectionUnitCode
());
wrapper
.
eq
(
TzBaseEnterpriseInfo:
:
getUseCode
,
model
.
getInspectionUnitCode
());
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/UseInfoMapper.xml
View file @
c145de89
...
@@ -5,9 +5,9 @@
...
@@ -5,9 +5,9 @@
UPDATE
UPDATE
idx_biz_jg_use_info
idx_biz_jg_use_info
SET
SET
NEXT_INSPECT_DATE
= #{nextInspectDate},
"NEXT_INSPECT_DATE"
= #{nextInspectDate},
LAST_INSPECT_TYPE
= #{lastInspectType},
"LAST_INSPECT_TYPE"
= #{lastInspectType},
LAST_INSPECT_REPORT_NO
= #{lastInspectReportNo}
"LAST_INSPECT_REPORT_NO"
= #{lastInspectReportNo}
WHERE
WHERE
RECORD = #{record}
RECORD = #{record}
...
...
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