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
e1474646
Commit
e1474646
authored
Nov 28, 2023
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监管对接接口添加
parent
1f58784a
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
157 additions
and
12 deletions
+157
-12
SuperviseController.java
...join/amos/api/openapi/controller/SuperviseController.java
+14
-6
UseInfoService.java
...yeejoin/amos/api/openapi/face/service/UseInfoService.java
+31
-0
TzsAccessFeignService.java
...yeejoin/amos/api/openapi/feign/TzsAccessFeignService.java
+22
-0
TzsTcmServiceFeignClient.java
...join/amos/api/openapi/feign/TzsTcmServiceFeignClient.java
+34
-0
TzsUserInfoMapper.java
...in/amos/boot/module/tcm/api/mapper/TzsUserInfoMapper.java
+1
-1
ITzBaseEnterpriseInfoService.java
.../module/tcm/api/service/ITzBaseEnterpriseInfoService.java
+3
-0
TzsUserInfoMapper.xml
...e-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
+4
-1
TzBaseEnterpriseInfoController.java
...le/tcm/biz/controller/TzBaseEnterpriseInfoController.java
+13
-0
TzBaseEnterpriseInfoServiceImpl.java
...tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+10
-0
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+15
-4
EquipmentCategoryServiceImpl.java
...le/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
+10
-0
No files found.
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/controller/SuperviseController.java
View file @
e1474646
...
...
@@ -40,12 +40,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
net.sf.json.JSONObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.component.event.RestEventTrigger
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
...
@@ -287,4 +282,17 @@ public class SuperviseController {
return
ResponseHelper
.
buildResponse
(
useInfoService
.
saveEquipmentInfo
(
equipmentInfoDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getUnitLicenceMessage"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据统一信用代码查询许可信息"
,
notes
=
"根据统一信用代码查询许可信息"
)
public
ResponseModel
<
Object
>
getUnitLicenceMessage
(
@RequestParam
(
"unitCode"
)
String
unitCode
)
{
return
ResponseHelper
.
buildResponse
(
useInfoService
.
getUnitLicenceMessage
(
unitCode
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getBusinessInformation"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据统一信用代码查询工商信息"
,
notes
=
"根据统一信用代码查询工商信息"
)
public
ResponseModel
<
Object
>
getBusinessInformation
(
@RequestParam
(
"unitCode"
)
String
unitCode
)
{
return
ResponseHelper
.
buildResponse
(
useInfoService
.
getBusinessInformation
(
unitCode
));
}
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/UseInfoService.java
View file @
e1474646
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
service
;
import
com.yeejoin.amos.api.openapi.face.dto.EquipmentInfoDto
;
import
com.yeejoin.amos.api.openapi.face.model.UnitLicenceModel
;
import
com.yeejoin.amos.api.openapi.face.model.UseInfoModel
;
import
com.yeejoin.amos.api.openapi.face.orm.dao.UseInfoMapper
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.UseInfo
;
import
com.yeejoin.amos.api.openapi.feign.TzsAccessFeignService
;
import
com.yeejoin.amos.api.openapi.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.api.openapi.feign.TzsTcmServiceFeignClient
;
import
feign.FeignException
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -17,6 +20,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* 特种设备基本信息-使用信息 服务类
...
...
@@ -32,6 +36,11 @@ public class UseInfoService extends AppBaseService<UseInfoModel, UseInfo, UseInf
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
@Autowired
TzsTcmServiceFeignClient
tzsTcmServiceFeignClient
;
@Autowired
TzsAccessFeignService
tzsAccessFeignService
;
// @Autowired
// AmosRequestContext amosRequestContext;
...
...
@@ -137,5 +146,27 @@ public class UseInfoService extends AppBaseService<UseInfoModel, UseInfo, UseInf
}
return
null
;
}
public
Object
getUnitLicenceMessage
(
String
unitCode
){
try
{
ResponseModel
<
Object
>
licenceByUnitCode
=
tzsTcmServiceFeignClient
.
getLicenceByUnitCode
(
unitCode
);
return
licenceByUnitCode
.
getResult
();
}
catch
(
Exception
e
){
logger
.
error
(
"查询许可信息失败--->"
,
e
);
e
.
printStackTrace
();
}
return
null
;
}
public
Object
getBusinessInformation
(
String
unitCode
){
try
{
ResponseModel
<
Map
<
String
,
Object
>>
data
=
tzsAccessFeignService
.
getData
(
unitCode
);
return
data
.
getResult
();
}
catch
(
Exception
e
){
logger
.
error
(
"查询工商信息失败--->"
,
e
);
e
.
printStackTrace
();
}
return
null
;
}
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/feign/TzsAccessFeignService.java
0 → 100644
View file @
e1474646
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
feign
;
import
com.yeejoin.amos.api.openapi.config.FeignConfiguration
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Map
;
@FeignClient
(
name
=
"AMOS-API-ACCESSAPI"
,
path
=
"/accessapi"
,
configuration
=
{
FeignConfiguration
.
class
})
public
interface
TzsAccessFeignService
{
/**
* 调用accessApi的接口
* @param code
* @return
*/
@RequestMapping
(
"/business/getData"
)
ResponseModel
<
Map
<
String
,
Object
>>
getData
(
@RequestParam
String
code
);
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/feign/TzsTcmServiceFeignClient.java
0 → 100644
View file @
e1474646
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
feign
;
import
com.yeejoin.amos.api.openapi.config.FeignConfiguration
;
import
com.yeejoin.amos.api.openapi.config.MultipartSupportConfig
;
import
com.yeejoin.amos.api.openapi.face.dto.EquipmentInfoDto
;
import
com.yeejoin.amos.api.openapi.face.model.InspectionDetectionInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.UnitLicenceModel
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.ConstructionInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.MaintenanceInfo
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
import
java.util.Map
;
@FeignClient
(
name
=
"TZS-COMMON"
,
path
=
"/tcm"
,
configuration
=
{
FeignConfiguration
.
class
})
public
interface
TzsTcmServiceFeignClient
{
/**
* 根据企业统一信用代码询许可信息
*
* @param unitCode 企业唯一编码
* @return
*/
@RequestMapping
(
value
=
"/baseEnterprise/getUnitLicenceMessage"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Object
>
getLicenceByUnitCode
(
@RequestParam
String
unitCode
);
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/mapper/TzsUserInfoMapper.java
View file @
e1474646
...
...
@@ -15,7 +15,7 @@ import java.util.Map;
public
interface
TzsUserInfoMapper
extends
BaseMapper
<
TzsUserInfo
>
{
Page
<
TzsUserInfoDto
>
selectPageMessage
(
@Param
(
"page"
)
Page
<
TzsUserInfoDto
>
page
,
@Param
(
"dto"
)
TzsUserInfoDto
dto
);
List
<
Map
<
String
,
Object
>>
getUserType
(
@Param
(
"unitType"
)
String
unitType
);
List
<
Map
<
String
,
Object
>>
getUserType
(
@Param
(
"unitType"
)
String
unitType
,
@Param
(
"install"
)
String
install
);
Map
<
String
,
Integer
>
getArrangementStatistic
(
String
companyCode
);
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/service/ITzBaseEnterpriseInfoService.java
View file @
e1474646
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.EquEnterDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.BaseUnitLicence
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.PageParam
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo
;
...
...
@@ -44,4 +45,6 @@ public interface ITzBaseEnterpriseInfoService extends IService<TzBaseEnterpriseI
TzBaseEnterpriseInfoDto
getInfoByUseCode
(
String
useCode
);
String
setLabel
(
List
<
Long
>
enterpriseIds
,
List
<
String
>
enterpriseLabels
);
BaseUnitLicence
getUnitLicenceMessage
(
String
unitCode
);
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
View file @
e1474646
...
...
@@ -146,9 +146,12 @@
WHERE
<if
test=
"unitType != null and unitType != ''"
>
type = 'QYRYGW' or type = #{unitType}
<if
test=
"install != null and install != ''"
>
or type = #{install}
</if>
</if>
<if
test=
"unitType == null or unitType == ''"
>
type like concat('QYRYGW','%')
type like concat('QYRYGW','%')
and type != 'QYRYGW-INSTALL'
</if>
</select>
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/TzBaseEnterpriseInfoController.java
View file @
e1474646
...
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.EquEnterDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.BaseUnitLicence
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.PageParam
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.EquipmentClassifityEnum
;
...
...
@@ -268,4 +269,16 @@ public class TzBaseEnterpriseInfoController {
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
resourceJson
=
JsonUtils
.
getResourceJson
(
equipCategory
);
return
ResponseHelper
.
buildResponse
(
resourceJson
.
get
(
EquipmentClassifityEnum
.
BDLS
.
getCode
()));
}
/**
* 监管对接
* @param unitCode
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getUnitLicenceMessage"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据统一信用代码查询许可信息"
,
notes
=
"根据统一信用代码查询许可信息"
)
public
ResponseModel
<
BaseUnitLicence
>
getUnitLicenceMessage
(
@RequestParam
(
"unitCode"
)
String
unitCode
)
{
return
ResponseHelper
.
buildResponse
(
iTzBaseEnterpriseInfoService
.
getUnitLicenceMessage
(
unitCode
));
}
}
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/TzBaseEnterpriseInfoServiceImpl.java
View file @
e1474646
...
...
@@ -616,4 +616,14 @@ public class TzBaseEnterpriseInfoServiceImpl
return
map
;
}
@Override
public
BaseUnitLicence
getUnitLicenceMessage
(
String
unitCode
)
{
// 许可信息
LambdaQueryWrapper
<
BaseUnitLicence
>
lambda
=
new
QueryWrapper
<
BaseUnitLicence
>().
lambda
();
lambda
.
eq
(
BaseUnitLicence:
:
getUnitCode
,
unitCode
);
lambda
.
orderByDesc
(
BaseUnitLicence:
:
getExpiryDate
);
lambda
.
last
(
"limit 1"
);
return
baseUnitLicenceService
.
getBaseMapper
().
selectOne
(
lambda
);
}
}
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 @
e1474646
...
...
@@ -366,6 +366,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
result
.
put
(
"creditCode"
,
companyModels
.
get
(
0
).
getCompanyCode
());
boolean
productCompany
=
false
;
boolean
useCompany
=
false
;
boolean
installCompany
=
false
;
for
(
CompanyModel
companyModel
:
companyModels
)
{
String
companyType
=
companyModel
.
getCompanyType
();
if
(
companyType
.
contains
(
"使用单位"
)
||
companyType
.
contains
(
"个人主体"
))
{
...
...
@@ -374,6 +375,9 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
if
(
companyType
.
contains
(
"充装单位"
)
||
companyType
.
contains
(
"安装改造维修单位"
)
||
companyType
.
contains
(
"制造单位"
)
||
companyType
.
contains
(
"设计单位"
))
{
productCompany
=
true
;
}
if
(
companyType
.
contains
(
"安装改造维修单位"
)){
installCompany
=
true
;
}
}
String
companyType
=
null
;
if
(
useCompany
)
{
...
...
@@ -385,6 +389,9 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
if
(
useCompany
&&
productCompany
)
{
companyType
=
"useAndPro"
;
}
if
(
installCompany
)
{
companyType
=
companyType
+
"AndInstall"
;
}
result
.
put
(
"companyType"
,
companyType
);
return
result
;
}
...
...
@@ -521,11 +528,15 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
@Override
public
List
<
Map
<
String
,
Object
>>
getUserType
(
String
unitType
)
{
if
(
unitType
.
equals
(
"pro"
))
{
return
tzsUserInfoMapper
.
getUserType
(
"QYRYGW-SCDW"
);
return
tzsUserInfoMapper
.
getUserType
(
"QYRYGW-SCDW"
,
null
);
}
else
if
(
unitType
.
equals
(
"use"
))
{
return
tzsUserInfoMapper
.
getUserType
(
"QYRYGW-SYDW"
);
}
else
{
return
tzsUserInfoMapper
.
getUserType
(
null
);
return
tzsUserInfoMapper
.
getUserType
(
"QYRYGW-SYDW"
,
null
);
}
else
if
(
unitType
.
equals
(
"useAndInstall"
)){
return
tzsUserInfoMapper
.
getUserType
(
"QYRYGW-SYDW"
,
"QYRYGW-INSTALL"
);
}
else
if
(
unitType
.
equals
(
"proAndInstall"
)){
return
tzsUserInfoMapper
.
getUserType
(
"QYRYGW-SCDW"
,
"QYRYGW-INSTALL"
);
}
else
{
return
tzsUserInfoMapper
.
getUserType
(
null
,
null
);
}
}
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
e1474646
...
...
@@ -2340,10 +2340,20 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
idxBizJgTechParamsElevatorService
.
update
(
idxBizJgTechParamsElevator
,
lambda
);
}
}
// 同步es
checkEsData
(
supervisoryCode
);
// 修改码表状态
updateStatus
(
supervisoryCode
);
return
true
;
}
public
void
updateStatus
(
String
supervisoryCode
){
SupervisoryCodeInfo
info
=
new
SupervisoryCodeInfo
();
info
.
setStatus
(
"1"
);
LambdaQueryWrapper
<
SupervisoryCodeInfo
>
lambda
=
new
QueryWrapper
<
SupervisoryCodeInfo
>().
lambda
();
lambda
.
eq
(
SupervisoryCodeInfo:
:
getSupervisoryCode
,
supervisoryCode
);
supervisoryCodeInfoMapper
.
update
(
info
,
lambda
);
}
@Transactional
public
Boolean
saveConstructionInfoData
(
IdxBizJgConstructionInfo
data
)
{
...
...
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