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
1446d2e9
Commit
1446d2e9
authored
Apr 02, 2025
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
需求【3197】
parent
7cbce420
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
3 deletions
+34
-3
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+30
-1
IdxBizJgProjectContraptionServiceImpl.java
...z/service/impl/IdxBizJgProjectContraptionServiceImpl.java
+3
-1
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+1
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/CommonController.java
View file @
1446d2e9
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.map.MapBuilder
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
...
@@ -14,7 +15,6 @@ import com.yeejoin.amos.boot.module.jg.api.dto.EquipmentClassifyDto;
import
com.yeejoin.amos.boot.module.jg.api.dto.UseFlagParamDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgCertificateReplenishService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
...
...
@@ -67,6 +67,11 @@ public class CommonController extends BaseController {
private
final
IJgCertificateReplenishService
iJgCertificateReplenishService
;
private
final
CodeUtil
codeUtil
;
/**
* 监管机构
*/
public
static
final
String
COMPANY_TYPE_SUPERVISION_NAME
=
"监管机构"
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/currentLoginInfo"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"当前登录人信息"
,
notes
=
"当前登录人信息"
)
...
...
@@ -143,6 +148,30 @@ public class CommonController extends BaseController {
return
ResponseHelper
.
buildResponse
(
commonService
.
getUnitListByType
(
type
,
business
));
}
/**
* 需求 【3197】
* 根据当前登录人获取使用单位列表(用作设备列表查询)
* 当前登录人:监管 -> 获取所有使用单位
* 其他 -> 当前登录人所在单位
* @return unitLists
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUseUnitListByCurrentLoginUser"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据当前登录人获取使用单位列表(用作设备列表查询)"
,
notes
=
"根据当前登录人获取使用单位列表(用作设备列表查询)"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getUseUnitListByCurrentLoginUser
()
{
String
companyType
=
getSelectedOrgInfo
().
getCompany
().
getCompanyType
();
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
if
(
COMPANY_TYPE_SUPERVISION_NAME
.
equals
(
companyType
))
{
result
=
commonService
.
getUnitListByType
(
"use"
,
null
);
}
else
{
result
.
add
(
MapBuilder
.<
String
,
Object
>
create
()
.
put
(
"useCode"
,
getSelectedOrgInfo
().
getCompany
().
getCompanyCode
())
.
put
(
"useUnit"
,
getSelectedOrgInfo
().
getCompany
().
getCompanyName
())
.
build
());
}
return
ResponseHelper
.
buildResponse
(
result
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/getMessage"
)
...
...
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/IdxBizJgProjectContraptionServiceImpl.java
View file @
1446d2e9
...
...
@@ -41,6 +41,7 @@ import org.typroject.tyboot.core.foundation.utils.Bean;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.ByteArrayOutputStream
;
...
...
@@ -81,6 +82,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
public
static
final
String
ORG_BRANCH_CODE
=
"orgBranchCode"
;
// 设备基本信息表单id
private
static
final
String
EQUIP_INFO_FORM_ID
=
"equipInfo"
;
public
static
final
String
USE_UNIT_CREDIT_CODE
=
"useUnitCreditCode"
;
@Resource
private
IdxBizJgUseInfoServiceImpl
useInfoService
;
@Resource
...
...
@@ -251,7 +253,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
street
=
street
.
split
(
"_"
)[
0
];
}
//获取街道
String
useUnitCreditCode
=
params
.
get
(
"useUnitCreditCode"
);
String
useUnitCreditCode
=
params
.
get
(
USE_UNIT_CREDIT_CODE
);
if
(!
StringUtils
.
isEmpty
(
useUnitCreditCode
)
&&
useUnitCreditCode
.
contains
(
"_"
)){
useUnitCreditCode
=
useUnitCreditCode
.
split
(
"_"
)[
0
];
}
...
...
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/IdxBizJgRegisterInfoServiceImpl.java
View file @
1446d2e9
...
...
@@ -2638,7 +2638,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(
companyLevel
.
equals
(
BaseController
.
COMPANY_TYPE_SUPERVISION
))
{
// 监管 右模糊查询
boolMust
.
must
(
QueryBuilders
.
wildcardQuery
(
"ORG_BRANCH_CODE.keyword"
,
QueryParser
.
escape
(
map
.
getString
(
"ORG_BRANCH_CODE"
))
+
"*"
));
}
else
{
// 企业 等于查询
boolMust
.
must
(
QueryBuilders
.
termQuery
(
"ORG_BRANCH_CODE.keyword"
,
map
.
getString
(
"ORG_BRANCH_CODE"
)
));
boolMust
.
must
(
QueryBuilders
.
wildcardQuery
(
"ORG_BRANCH_CODE.keyword"
,
QueryParser
.
escape
(
map
.
getString
(
"ORG_BRANCH_CODE"
))
+
"*"
));
}
}
builder
.
query
(
boolMust
);
...
...
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