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
6a6e30a4
Commit
6a6e30a4
authored
May 12, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_register' of…
Merge branch 'develop_tzs_register' of
http://39.100.92.250:5000/moa/amos-boot-biz
into develop_tzs_register
parents
834d24d0
53594d82
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
769 additions
and
65 deletions
+769
-65
FieldMapping.java
...yeejoin/amos/boot/biz/common/annotation/FieldMapping.java
+44
-0
ResultFieldMapping.java
...n/amos/boot/biz/common/annotation/ResultFieldMapping.java
+29
-0
FieldMappingAspect.java
.../yeejoin/amos/boot/biz/common/aop/FieldMappingAspect.java
+353
-0
JgUseRegistrationManageDto.java
...os/boot/module/jg/api/dto/JgUseRegistrationManageDto.java
+6
-0
CommonMapper.java
.../yeejoin/amos/boot/module/jg/api/mapper/CommonMapper.java
+6
-1
JgVehicleInformationVo.java
...in/amos/boot/module/jg/api/vo/JgVehicleInformationVo.java
+3
-0
CommonMapper.xml
...-module-jg-api/src/main/resources/mapper/CommonMapper.xml
+29
-0
JgChangeRegistrationUnitMapper.xml
.../main/resources/mapper/JgChangeRegistrationUnitMapper.xml
+4
-1
JgChangeVehicleRegistrationUnitMapper.xml
...esources/mapper/JgChangeVehicleRegistrationUnitMapper.xml
+6
-0
JgInstallationNoticeMapper.xml
.../src/main/resources/mapper/JgInstallationNoticeMapper.xml
+6
-0
JgUseRegistrationManageMapper.xml
...c/main/resources/mapper/JgUseRegistrationManageMapper.xml
+6
-0
JgVehicleInformationMapper.xml
.../src/main/resources/mapper/JgVehicleInformationMapper.xml
+3
-0
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+35
-2
IdxBizJqEquipmentRegisterController.java
...g/biz/controller/IdxBizJqEquipmentRegisterController.java
+10
-1
JgChangeVehicleRegistrationUnitController.java
...controller/JgChangeVehicleRegistrationUnitController.java
+3
-0
JgReformNoticeController.java
...ot/module/jg/biz/controller/JgReformNoticeController.java
+0
-1
JgUseRegistrationManageController.java
.../jg/biz/controller/JgUseRegistrationManageController.java
+7
-3
JgVehicleInformationController.java
...ule/jg/biz/controller/JgVehicleInformationController.java
+18
-16
ICommonService.java
...ejoin/amos/boot/module/jg/biz/service/ICommonService.java
+1
-1
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+30
-6
IdxBizJgProjectContraptionServiceImpl.java
...z/service/impl/IdxBizJgProjectContraptionServiceImpl.java
+3
-1
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+14
-5
JgCertificateReplenishServiceImpl.java
...g/biz/service/impl/JgCertificateReplenishServiceImpl.java
+2
-1
JgChangeRegistrationTransferServiceImpl.java
...service/impl/JgChangeRegistrationTransferServiceImpl.java
+4
-0
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+4
-1
JgChangeVehicleRegistrationUnitServiceImpl.java
...vice/impl/JgChangeVehicleRegistrationUnitServiceImpl.java
+4
-0
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+5
-0
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+4
-0
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+5
-2
JgTransferNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
+4
-0
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+5
-0
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+3
-2
ITzsUserInfoService.java
...amos/boot/module/tcm/api/service/ITzsUserInfoService.java
+5
-0
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+15
-1
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+87
-16
EquipmentCategoryServiceImpl.java
...le/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
+6
-4
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/annotation/FieldMapping.java
0 → 100644
View file @
6a6e30a4
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
annotation
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
@Target
(
ElementType
.
METHOD
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
FieldMapping
{
/**
* 字段映射配置组
*/
FieldMap
[]
value
();
@interface
FieldMap
{
// 参数索引位置(默认第0个参数)
int
paramIndex
()
default
0
;
// 源字段路径(支持嵌套)
String
sourceField
();
// 目标字段路径(支持嵌套)
String
targetField
();
// 查询服务类
Class
<?>
serviceClass
();
// 查询方法名
String
queryMethod
();
// 查询参数类型(默认String)
Class
<?>
queryParamType
()
default
String
.
class
;
// 是否覆盖源字段
boolean
overrideSource
()
default
false
;
// 是否直接使用整个参数作为源值
boolean
useEntireParam
()
default
false
;
// 是否替换整个参数
boolean
replaceParam
()
default
false
;
}
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/annotation/ResultFieldMapping.java
0 → 100644
View file @
6a6e30a4
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
annotation
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Target
(
ElementType
.
METHOD
)
public
@interface
ResultFieldMapping
{
/**
* 需要转换的字段配置
*/
ResultFieldMap
[]
value
();
@interface
ResultFieldMap
{
// 源字段路径(支持嵌套)
String
sourceField
();
// 目标字段路径(支持嵌套)
String
targetField
();
// 查询服务类
Class
<?>
serviceClass
();
// 查询方法名称
String
queryMethod
();
// 查询参数类型(默认String)
Class
<?>
queryParamType
()
default
String
.
class
;
}
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/aop/FieldMappingAspect.java
0 → 100644
View file @
6a6e30a4
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
aop
;
import
com.google.common.cache.CacheBuilder
;
import
com.google.common.cache.CacheLoader
;
import
com.google.common.cache.LoadingCache
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldMapping
;
import
com.yeejoin.amos.boot.biz.common.annotation.ResultFieldMapping
;
import
lombok.extern.slf4j.Slf4j
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.stereotype.Component
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Method
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ExecutionException
;
import
java.util.concurrent.TimeUnit
;
@Aspect
@Component
@Slf4j
public
class
FieldMappingAspect
{
// 使用Guava Cache构建二级缓存
private
static
final
LoadingCache
<
Class
<?>,
Map
<
String
,
Field
>>
FIELD_CACHE
=
CacheBuilder
.
newBuilder
()
.
maximumSize
(
1000
)
// 控制最大缓存类数量
.
expireAfterAccess
(
1
,
TimeUnit
.
HOURS
)
// 访问1小时后过期
.
weakKeys
()
// 使用弱引用键防止内存泄漏
.
build
(
new
CacheLoader
<
Class
<?>,
Map
<
String
,
Field
>>()
{
// 当缓存未命中时,该方法会为指定类创建一个线程安全的空字段映射容器(ConcurrentHashMap),用于后续存储该类的反射字段信息
@Override
public
Map
<
String
,
Field
>
load
(
Class
<?>
clazz
)
{
return
new
ConcurrentHashMap
<>();
}
});
// 方法缓存优化
private
static
final
LoadingCache
<
MethodKey
,
Method
>
METHOD_CACHE
=
CacheBuilder
.
newBuilder
()
.
maximumSize
(
1000
)
.
expireAfterAccess
(
1
,
TimeUnit
.
HOURS
)
// 访问1小时后过期
.
weakKeys
()
// 使用弱引用键防止内存泄漏
.
build
(
new
CacheLoader
<
MethodKey
,
Method
>()
{
public
Method
load
(
MethodKey
key
)
throws
Exception
{
return
key
.
clazz
.
getMethod
(
key
.
methodName
,
key
.
paramTypes
);
}
});
private
final
ApplicationContext
applicationContext
;
public
FieldMappingAspect
(
ApplicationContext
applicationContext
)
{
this
.
applicationContext
=
applicationContext
;
}
@Around
(
"@annotation(fieldMapping)"
)
public
Object
doFieldMapping
(
ProceedingJoinPoint
joinPoint
,
FieldMapping
fieldMapping
)
throws
Throwable
{
Object
[]
args
=
joinPoint
.
getArgs
();
// 遍历处理所有字段映射配置
for
(
FieldMapping
.
FieldMap
mapping
:
fieldMapping
.
value
())
{
processSingleMapping
(
args
,
mapping
);
}
return
joinPoint
.
proceed
(
args
);
}
private
void
processSingleMapping
(
Object
[]
args
,
FieldMapping
.
FieldMap
mapping
)
{
// 使用缓存获取方法
MethodKey
methodKey
=
new
MethodKey
(
mapping
.
serviceClass
(),
mapping
.
queryMethod
(),
mapping
.
queryParamType
()
);
try
{
if
(
args
.
length
<=
mapping
.
paramIndex
())
return
;
Object
paramObj
=
args
[
mapping
.
paramIndex
()];
Object
sourceValue
;
// 获取源值逻辑
if
(
mapping
.
useEntireParam
())
{
sourceValue
=
paramObj
;
}
else
{
sourceValue
=
getSourceValue
(
paramObj
,
mapping
.
sourceField
());
}
if
(
sourceValue
==
null
)
{
if
(
mapping
.
replaceParam
())
{
args
[
mapping
.
paramIndex
()]
=
null
;
// 允许清空参数
}
return
;
}
// 服务调用逻辑
Object
service
=
applicationContext
.
getBean
(
mapping
.
serviceClass
());
Method
queryMethod
=
METHOD_CACHE
.
get
(
methodKey
);
Object
convertedValue
=
convertType
(
sourceValue
,
mapping
.
queryParamType
());
Object
result
=
queryMethod
.
invoke
(
service
,
convertedValue
);
// 设置目标字段
if
(
mapping
.
replaceParam
())
{
Class
<?>
paramType
=
args
[
mapping
.
paramIndex
()].
getClass
();
if
(!
paramType
.
isAssignableFrom
(
result
.
getClass
()))
{
throw
new
IllegalArgumentException
(
"类型不匹配: "
+
result
.
getClass
()
+
" cannot be cast to "
+
paramType
);
}
args
[
mapping
.
paramIndex
()]
=
result
;
// 直接替换参数
}
else
{
setTargetValue
(
paramObj
,
mapping
.
overrideSource
()
?
mapping
.
sourceField
()
:
mapping
.
targetField
(),
result
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"Field mapping failed for {}: {}"
,
mapping
.
sourceField
(),
e
.
getMessage
());
Throwable
cause
=
e
.
getCause
();
if
(
cause
instanceof
NoSuchMethodException
)
{
log
.
error
(
"Method not found: {}.{}({})"
,
mapping
.
serviceClass
().
getSimpleName
(),
mapping
.
queryMethod
(),
mapping
.
queryParamType
().
getSimpleName
());
}
}
}
private
Object
getSourceValue
(
Object
paramObj
,
String
key
)
{
if
(
key
.
contains
(
"."
))
{
// 新增嵌套判断
return
getNestedFieldValue
(
paramObj
,
key
);
}
if
(
paramObj
instanceof
Map
)
{
return
((
Map
<?,
?>)
paramObj
).
get
(
key
);
}
return
getFieldValue
(
paramObj
,
key
);
}
private
Object
getFieldValue
(
Object
obj
,
String
fieldName
)
{
try
{
Field
field
=
getCachedField
(
obj
.
getClass
(),
fieldName
);
return
field
!=
null
?
field
.
get
(
obj
)
:
null
;
}
catch
(
IllegalAccessException
e
)
{
log
.
debug
(
"Field access error: {}"
,
e
.
getMessage
());
return
null
;
}
}
private
Field
getCachedField
(
Class
<?>
clazz
,
String
fieldName
)
{
try
{
return
FIELD_CACHE
.
get
(
clazz
)
.
computeIfAbsent
(
fieldName
,
name
->
{
try
{
Field
field
=
clazz
.
getDeclaredField
(
name
);
field
.
setAccessible
(
true
);
return
field
;
}
catch
(
NoSuchFieldException
e
)
{
log
.
debug
(
"Field not found: {} in {}"
,
name
,
clazz
.
getName
());
return
null
;
}
});
}
catch
(
ExecutionException
e
)
{
log
.
error
(
"Cache operation failed"
,
e
);
return
null
;
}
}
private
Object
convertType
(
Object
value
,
Class
<?>
targetType
)
{
if
(
value
==
null
)
return
null
;
if
(
targetType
.
isAssignableFrom
(
value
.
getClass
()))
{
return
value
;
}
if
(
targetType
==
String
.
class
)
return
value
.
toString
();
if
(
targetType
==
int
.
class
||
targetType
==
Integer
.
class
)
{
return
Integer
.
parseInt
(
value
.
toString
());
}
if
(
targetType
==
long
.
class
||
targetType
==
Long
.
class
)
{
return
Long
.
parseLong
(
value
.
toString
());
}
log
.
warn
(
"Unsupported type conversion: {} -> {}"
,
value
.
getClass
(),
targetType
);
return
value
;
}
private
void
setTargetValue
(
Object
paramObj
,
String
key
,
Object
value
)
{
if
(
key
.
contains
(
"."
))
{
// 新增嵌套判断
setNestedFieldValue
(
paramObj
,
key
,
value
);
return
;
}
if
(
paramObj
instanceof
Map
)
{
((
Map
<
String
,
Object
>)
paramObj
).
put
(
key
,
value
);
}
else
{
Optional
.
ofNullable
(
getCachedField
(
paramObj
.
getClass
(),
key
))
.
ifPresent
(
field
->
{
try
{
field
.
set
(
paramObj
,
convertType
(
value
,
field
.
getType
()));
}
catch
(
IllegalAccessException
e
)
{
log
.
debug
(
"Field set error: {}"
,
e
.
getMessage
());
}
});
}
}
private
Object
getNestedFieldValue
(
Object
obj
,
String
fieldPath
)
{
String
[]
parts
=
fieldPath
.
split
(
"\\."
);
Object
current
=
obj
;
for
(
String
part
:
parts
)
{
if
(
current
==
null
)
return
null
;
if
(
current
instanceof
Map
)
{
current
=
((
Map
<?,
?>)
current
).
get
(
part
);
}
else
{
Field
field
=
getCachedField
(
current
.
getClass
(),
part
);
if
(
field
==
null
)
return
null
;
try
{
current
=
field
.
get
(
current
);
}
catch
(
IllegalAccessException
e
)
{
log
.
debug
(
"Nested field access error: {}"
,
e
.
getMessage
());
return
null
;
}
}
}
return
current
;
}
private
void
setNestedFieldValue
(
Object
obj
,
String
fieldPath
,
Object
value
)
{
String
[]
parts
=
fieldPath
.
split
(
"\\."
);
Object
current
=
obj
;
try
{
for
(
int
i
=
0
;
i
<
parts
.
length
-
1
;
i
++)
{
String
part
=
parts
[
i
];
if
(
current
instanceof
Map
)
{
current
=
((
Map
<
String
,
Object
>)
current
).
computeIfAbsent
(
part
,
k
->
new
HashMap
<>());
}
else
{
Field
field
=
getCachedField
(
current
.
getClass
(),
part
);
if
(
field
==
null
)
return
;
Object
next
=
field
.
get
(
current
);
if
(
next
==
null
)
{
next
=
field
.
getType
().
newInstance
();
field
.
set
(
current
,
next
);
}
current
=
next
;
}
}
String
lastPart
=
parts
[
parts
.
length
-
1
];
if
(
current
instanceof
Map
)
{
((
Map
<
String
,
Object
>)
current
).
put
(
lastPart
,
value
);
}
else
{
Field
field
=
getCachedField
(
current
.
getClass
(),
lastPart
);
if
(
field
!=
null
)
{
Object
converted
=
convertType
(
value
,
field
.
getType
());
field
.
set
(
current
,
converted
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"Nested field set error"
,
e
);
}
}
@Around
(
"@annotation(resultFieldMapping)"
)
public
Object
processResultMapping
(
ProceedingJoinPoint
joinPoint
,
ResultFieldMapping
resultFieldMapping
)
throws
Throwable
{
Object
result
=
joinPoint
.
proceed
();
return
processResultObject
(
result
,
resultFieldMapping
.
value
());
}
private
Object
processResultObject
(
Object
result
,
ResultFieldMapping
.
ResultFieldMap
[]
resultFieldMaps
)
{
if
(
result
==
null
||
resultFieldMaps
.
length
==
0
)
return
result
;
try
{
// 处理集合类型
if
(
result
instanceof
Collection
)
{
((
Collection
<?>)
result
).
forEach
(
item
->
processItem
(
item
,
resultFieldMaps
));
}
// 处理数组类型
else
if
(
result
.
getClass
().
isArray
())
{
Arrays
.
stream
((
Object
[])
result
).
forEach
(
item
->
processItem
(
item
,
resultFieldMaps
));
}
// 处理单个对象
else
{
processItem
(
result
,
resultFieldMaps
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"Result mapping processing failed"
,
e
);
}
return
result
;
}
private
void
processItem
(
Object
item
,
ResultFieldMapping
.
ResultFieldMap
[]
resultFieldMaps
)
{
for
(
ResultFieldMapping
.
ResultFieldMap
mapping
:
resultFieldMaps
)
{
try
{
// 使用缓存获取方法
MethodKey
methodKey
=
new
MethodKey
(
mapping
.
serviceClass
(),
mapping
.
queryMethod
(),
mapping
.
queryParamType
()
);
// 获取源字段值
Object
sourceFieldValue
=
getNestedFieldValue
(
item
,
mapping
.
sourceField
());
if
(
sourceFieldValue
==
null
)
continue
;
// 转换类型
Object
convertedValue
=
convertType
(
sourceFieldValue
,
mapping
.
queryParamType
());
// 调用服务查询
Object
service
=
applicationContext
.
getBean
(
mapping
.
serviceClass
());
Method
method
=
METHOD_CACHE
.
get
(
methodKey
);
Object
targetFieldValue
=
method
.
invoke
(
service
,
convertedValue
);
// 设置名称值
setNestedFieldValue
(
item
,
mapping
.
targetField
(),
targetFieldValue
);
}
catch
(
Exception
e
)
{
log
.
warn
(
"Field mapping failed for {}: {}"
,
mapping
.
sourceField
(),
e
.
getMessage
());
}
}
}
// 在FieldMappingAspect类内部添加
private
static
class
MethodKey
{
final
Class
<?>
clazz
;
final
String
methodName
;
final
Class
<?>[]
paramTypes
;
MethodKey
(
Class
<?>
clazz
,
String
methodName
,
Class
<?>...
paramTypes
)
{
this
.
clazz
=
clazz
;
this
.
methodName
=
methodName
;
this
.
paramTypes
=
paramTypes
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
MethodKey
methodKey
=
(
MethodKey
)
o
;
return
Objects
.
equals
(
clazz
,
methodKey
.
clazz
)
&&
Objects
.
equals
(
methodName
,
methodKey
.
methodName
)
&&
Arrays
.
equals
(
paramTypes
,
methodKey
.
paramTypes
);
}
@Override
public
int
hashCode
()
{
int
result
=
Objects
.
hash
(
clazz
,
methodName
);
result
=
31
*
result
+
Arrays
.
hashCode
(
paramTypes
);
return
result
;
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgUseRegistrationManageDto.java
View file @
6a6e30a4
...
...
@@ -100,6 +100,9 @@ public class JgUseRegistrationManageDto extends BaseDto {
@ApiModelProperty
(
value
=
"使用单位统一信用代码-搜索使用"
)
private
String
useUnitCreditCodeForSearch
;
@ApiModelProperty
(
value
=
"使用单位名称-搜索使用"
)
private
String
useUnitCreditNameForSearch
;
@ApiModelProperty
(
value
=
"是否车用气瓶--过滤数据使用"
)
private
String
whetherVehicleCylinder
;
...
...
@@ -141,4 +144,7 @@ public class JgUseRegistrationManageDto extends BaseDto {
@ApiModelProperty
(
"产权单位code_name"
)
private
String
estateUnitName
;
@ApiModelProperty
(
"使用单位seq"
)
private
String
useUnitSeq
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/CommonMapper.java
View file @
6a6e30a4
...
...
@@ -4,7 +4,6 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.dto.CountDto
;
import
com.yeejoin.amos.boot.biz.common.dto.KeyValueDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto
;
import
com.yeejoin.amos.boot.module.jg.api.bo.JgBizCountDataBO
;
...
...
@@ -290,5 +289,11 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
List
<
KeyValueDto
>
queryAllCompanyDict
();
Integer
checkRecordUniqueness
(
String
record
);
String
queryUnitCreditInfoBySeq
(
String
unitSeq
);
String
queryUnitInfoByCreditCode
(
String
unitCreditCode
);
List
<
Map
<
String
,
Object
>>
getUnitInfoListByType
(
String
type
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/vo/JgVehicleInformationVo.java
View file @
6a6e30a4
...
...
@@ -281,4 +281,7 @@ public class JgVehicleInformationVo implements Serializable {
@ApiModelProperty
(
value
=
"投用日期"
)
private
String
useDate
;
@ApiModelProperty
(
value
=
"产权单位seq"
)
private
String
estateUnitSeq
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/CommonMapper.xml
View file @
6a6e30a4
...
...
@@ -22,6 +22,27 @@
</if>
</select>
<select
id=
"getUnitInfoListByType"
resultType=
"java.util.Map"
>
SELECT sequence_nbr AS useCode,
CASE
WHEN unit_type = '个人主体'
THEN CONCAT(use_unit, '_', SUBSTRING(use_unit_code, LENGTH(use_unit_code) - 3, 4))
ELSE use_unit
END AS useUnit
FROM tz_base_enterprise_info
WHERE is_delete = '0'
<if
test=
"type != null and type != 'all'"
>
<choose>
<when
test=
"type == '使用单位'"
>
and ( unit_type = '个人主体' OR unit_type LIKE CONCAT('%', #{type}, '%') )
</when>
<otherwise>
and unit_type LIKE CONCAT('%', #{type}, '%')
</otherwise>
</choose>
</if>
</select>
<select
id=
"getSecurityAdmin"
resultType=
"java.util.Map"
>
SELECT
sequence_nbr sequenceNbr,
...
...
@@ -2762,4 +2783,12 @@
<select
id=
"checkRecordUniqueness"
resultType=
"java.lang.Integer"
>
SELECT COUNT(*) FROM idx_biz_jg_use_info jui WHERE jui.record = #{record}
</select>
<select
id=
"queryUnitCreditInfoBySeq"
resultType=
"java.lang.String"
>
select concat(use_unit_code, '_', use_unit) useUnitCreditCode from tz_base_enterprise_info where sequence_nbr = #{unitSeq}
</select>
<select
id=
"queryUnitInfoByCreditCode"
resultType=
"java.lang.String"
>
select sequence_nbr seq from tz_base_enterprise_info where use_unit_code = #{unitCreditCode}
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgChangeRegistrationUnitMapper.xml
View file @
6a6e30a4
...
...
@@ -17,7 +17,7 @@
AND isn.receive_org_code = #{param.receiveOrgCode}
</if>
<if
test=
"param.useUnitName != null and param.useUnitName != ''"
>
AND isn.use_unit_
code = #{param.useUnitName}
AND isn.use_unit_
name like concat ('%',#{param.useUnitName},'%')
</if>
<if
test=
"param.status != null and param.status != ''"
>
AND isn.status = #{param.status}
...
...
@@ -28,6 +28,9 @@
<if
test=
"param.newUseUnitCreditCode != null and param.newUseUnitCreditCode != ''"
>
AND isn.new_use_unit_credit_code = #{param.newUseUnitCreditCode}
</if>
<if
test=
"param.newUseUnitName != null and param.newUseUnitName != ''"
>
AND isn.new_use_unit_name like concat ('%',#{param.newUseUnitName},'%')
</if>
<if
test=
"param.equCodeB != null and param.equCodeB != ''"
>
AND isn.equ_code_b like concat('%',#{param.equCodeB},'%')
</if>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgChangeVehicleRegistrationUnitMapper.xml
View file @
6a6e30a4
...
...
@@ -83,9 +83,15 @@
<if
test=
"dto.newUseUnitCreditCode != null and dto.newUseUnitCreditCode != ''"
>
and cru.new_use_unit_credit_code = #{dto.newUseUnitCreditCode}
</if>
<if
test=
"dto.newUseUnitName != null and dto.newUseUnitName != ''"
>
and cru.new_use_unit_name like concat ('%',#{dto.newUseUnitName},'%')
</if>
<if
test=
"dto.useUnitCreditCode != null and dto.useUnitCreditCode != ''"
>
and cru.use_unit_credit_code = #{dto.useUnitCreditCode}
</if>
<if
test=
"dto.useUnitName != null and dto.useUnitName != ''"
>
and cru.use_unit_name like concat ('%',#{dto.useUnitName},'%')
</if>
<if
test=
"dto.createDate != null"
>
AND cru.create_date LIKE concat(DATE_FORMAT(#{dto.createDate},'%Y-%m-%d'),'%')
</if>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgInstallationNoticeMapper.xml
View file @
6a6e30a4
...
...
@@ -50,6 +50,9 @@
<if
test=
"param.installUnitId != null and param.installUnitId != ''"
>
AND isn.install_unit_credit_code = #{param.installUnitId}
</if>
<if
test=
"param.installUnitName != null and param.installUnitName != ''"
>
AND isn.install_unit_name like concat ('%',#{param.installUnitName},'%')
</if>
<if
test=
"param.noticeStatus != null and param.noticeStatus != ''"
>
AND isn.notice_status = #{param.noticeStatus}
</if>
...
...
@@ -74,6 +77,9 @@
<if
test=
"param.useUnitCreditCode != null and param.useUnitCreditCode != ''"
>
AND isn.use_unit_credit_code = #{param.useUnitCreditCode}
</if>
<if
test=
"param.useUnitName != null and param.useUnitName != ''"
>
AND isn.use_unit_name like concat ('%',#{param.useUnitName},'%')
</if>
<if
test=
"param.orgBranchCode != null and param.orgBranchCode != ''"
>
<choose>
<when
test=
"client == 'jgLook'"
>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationManageMapper.xml
View file @
6a6e30a4
...
...
@@ -124,6 +124,9 @@
<if
test=
"dto.useUnitCreditCodeForSearch != null and dto.useUnitCreditCodeForSearch != ''"
>
and tjurm.use_unit_credit_code = #{dto.useUnitCreditCodeForSearch}
</if>
<if
test=
"dto.useUnitCreditNameForSearch != null and dto.useUnitCreditNameForSearch != ''"
>
and tjurm.use_unit_name like concat ('%',#{dto.useUnitCreditNameForSearch},'%')
</if>
<if
test=
"dto.receiveCompanyCode != null and dto.receiveCompanyCode != ''"
>
and tjurm.receive_company_code = #{dto.receiveCompanyCode}
</if>
...
...
@@ -205,6 +208,9 @@
<if
test=
"dto.useUnitCreditCodeForSearch != null and dto.useUnitCreditCodeForSearch != ''"
>
and tjurm.use_unit_credit_code = #{dto.useUnitCreditCodeForSearch}
</if>
<if
test=
"dto.useUnitCreditNameForSearch != null and dto.useUnitCreditNameForSearch != ''"
>
and tjurm.use_unit_name like concat ('%',#{dto.useUnitCreditNameForSearch},'%')
</if>
<if
test=
"dto.receiveCompanyCode != null and dto.receiveCompanyCode != ''"
>
and tjurm.receive_company_code = #{dto.receiveCompanyCode}
</if>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgVehicleInformationMapper.xml
View file @
6a6e30a4
...
...
@@ -35,6 +35,9 @@
<if
test=
"dto.useUnitCode != null and dto.useUnitCode != ''"
>
and tjvi.use_unit_credit_code = #{dto.useUnitCode}
</if>
<if
test=
"dto.useUnitName != null and dto.useUnitName != ''"
>
and tjvi.use_unit_name like concat ('%',#{dto.useUnitName},'%')
</if>
<if
test=
"dto.dataType == 'supervision' and client == 'jgAudit' "
>
AND tjvi.receive_company_code = #{dto.useUnitCreditCode}
AND tjvi.status
<![CDATA[<>]]>
'使用单位待提交'
...
...
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 @
6a6e30a4
...
...
@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldMapping
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
...
...
@@ -22,6 +23,7 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgCertificateReplenishServic
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IPdfService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgRegistrationHistoryServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.CodeUtil
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto
;
...
...
@@ -148,7 +150,7 @@ public class CommonController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过单位类型获取单位列表"
,
notes
=
"通过单位类型获取单位列表"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getUnitList
(
@RequestParam
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"business"
,
required
=
false
)
String
business
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getUnitListByType
(
type
,
business
));
return
ResponseHelper
.
buildResponse
(
commonService
.
getUnitListByType
(
type
,
business
,
false
));
}
/**
...
...
@@ -165,7 +167,7 @@ public class CommonController extends BaseController {
String
companyType
=
getSelectedOrgInfo
().
getCompany
().
getCompanyType
();
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
if
(
COMPANY_TYPE_SUPERVISION_NAME
.
equals
(
companyType
))
{
result
=
commonService
.
getUnitListByType
(
"use"
,
null
);
result
=
commonService
.
getUnitListByType
(
"use"
,
null
,
false
);
}
else
{
result
.
add
(
MapBuilder
.<
String
,
Object
>
create
()
.
put
(
"useCode"
,
getSelectedOrgInfo
().
getCompany
().
getCompanyCode
())
...
...
@@ -398,6 +400,26 @@ public class CommonController extends BaseController {
@PostMapping
(
value
=
"/saveOrSubmit"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"业务发起公共接口"
,
notes
=
"业务发起公共接口"
)
@RestEventTrigger
(
value
=
"operateLogRestEventHandler"
)
@FieldMapping
({
@FieldMapping
.
FieldMap
(
sourceField
=
"notice.estateUnitSeq"
,
paramIndex
=
1
,
targetField
=
"notice.estateUnitName"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitCreditInfoBySeq"
),
@FieldMapping
.
FieldMap
(
sourceField
=
"notice.propertyUnitSeq"
,
paramIndex
=
1
,
targetField
=
"notice.propertyUnitName"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitCreditInfoBySeq"
),
@FieldMapping
.
FieldMap
(
sourceField
=
"notice.useUnitSeq"
,
paramIndex
=
1
,
targetField
=
"notice.useUnitCreditCode"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitCreditInfoBySeq"
)
})
public
ResponseModel
<
Object
>
save
(
@RequestParam
(
value
=
"submitType"
,
required
=
false
)
String
submitType
,
@RequestBody
Map
<
String
,
Object
>
map
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
...
...
@@ -830,6 +852,7 @@ public class CommonController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"使用登记表生成"
,
notes
=
"使用登记表生成"
)
@PostMapping
(
value
=
"/getRegistrationFormUrl"
)
@FieldMapping
({
@FieldMapping
.
FieldMap
(
sourceField
=
"formData.estateUnitSeq"
,
targetField
=
"formData.estateUnitName"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitCreditInfoBySeq"
,
overrideSource
=
true
)})
public
ResponseModel
<
Map
<
String
,
Object
>>
getRegistrationFormUrl
(
@RequestBody
JSONObject
map
)
{
JSONObject
formData
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
map
.
get
(
"formData"
)));
String
manageType
=
String
.
valueOf
(
map
.
get
(
"manageType"
));
...
...
@@ -869,6 +892,7 @@ public class CommonController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"pdf流生成"
,
notes
=
"pdf流生成"
)
@PostMapping
(
value
=
"/getRegistrationFormStream"
)
@FieldMapping
({
@FieldMapping
.
FieldMap
(
sourceField
=
"formData.estateUnitSeq"
,
targetField
=
"formData.estateUnitName"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitCreditInfoBySeq"
)})
public
void
getRegistrationFormStream
(
@RequestBody
JSONObject
map
,
HttpServletResponse
response
)
{
JSONObject
formData
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
map
.
get
(
"formData"
)));
String
manageType
=
String
.
valueOf
(
map
.
get
(
"manageType"
));
...
...
@@ -894,6 +918,7 @@ public class CommonController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"使用登记表/补证申请表生成"
,
notes
=
"使用登记表/补证申请表生成"
)
@PostMapping
(
value
=
"/getRegistrationOrCertReplenishFormUrl"
)
@FieldMapping
({
@FieldMapping
.
FieldMap
(
sourceField
=
"formData.estateUnitSeq"
,
targetField
=
"formData.estateUnitName"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitCreditInfoBySeq"
)})
public
ResponseModel
<
Map
<
String
,
Object
>>
getRegistrationOrCertReplenishFormUrl
(
@RequestBody
JSONObject
jsonObject
)
{
String
formBusinessType
=
Objects
.
toString
(
jsonObject
.
get
(
"formBusinessType"
));
if
(
ApplicationFormTypeEnum
.
BZDJ
.
getBusinessCode
().
equals
(
formBusinessType
))
{
...
...
@@ -918,4 +943,12 @@ public class CommonController extends BaseController {
.
in
(
DataDictionary:
:
getParent
,
new
ArrayList
<>(
Arrays
.
asList
(
parentIds
.
split
(
","
))))
.
list
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUnitInfoList"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过单位类型获取单位列表-返回数据主键"
,
notes
=
"通过单位类型获取单位列表-返回数据主键"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getUnitInfoList
(
@RequestParam
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"business"
,
required
=
false
)
String
business
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getUnitListByType
(
type
,
business
,
true
));
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/IdxBizJqEquipmentRegisterController.java
View file @
6a6e30a4
...
...
@@ -3,10 +3,12 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldMapping
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -21,12 +23,16 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.net.URLEncoder
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -120,6 +126,9 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备注册信息分页查询"
,
notes
=
"设备注册信息分页查询"
)
@FieldMapping
({
@FieldMapping
.
FieldMap
(
sourceField
=
"useUnitSeq"
,
targetField
=
"useUnitCreditCode"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitCreditInfoBySeq"
),
})
public
ResponseModel
<
Page
<
JSONObject
>>
queryForPage
(
@RequestParam
Map
<
String
,
Object
>
map
)
{
JSONObject
jsonObject
=
new
JSONObject
(
map
);
return
ResponseHelper
.
buildResponse
(
idxBizJgRegisterInfoService
.
queryForEquipmentRegisterPage
(
jsonObject
));
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgChangeVehicleRegistrationUnitController.java
View file @
6a6e30a4
...
...
@@ -2,11 +2,13 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldMapping
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeVehicleRegistrationUnitDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeVehicleRegistrationUnit
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgChangeVehicleRegistrationUnitServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -122,6 +124,7 @@ public class JgChangeVehicleRegistrationUnitController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUseRegistrationCodeData"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前企业,某接收机构审批的使用登记证信息"
,
notes
=
"获取当前企业,某接收机构审批的使用登记证信息"
)
@FieldMapping
({
@FieldMapping
.
FieldMap
(
paramIndex
=
2
,
useEntireParam
=
true
,
sourceField
=
"useUnitCreditCode"
,
replaceParam
=
true
,
targetField
=
"useUnitCreditCode"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitCreditInfoBySeq"
)})
public
ResponseModel
<
Page
<
JgUseRegistrationManageDto
>>
getUseRegistrationCodeData
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgReformNoticeController.java
View file @
6a6e30a4
...
...
@@ -20,7 +20,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Map
;
import
java.util.Objects
;
/**
* 改造告知
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgUseRegistrationManageController.java
View file @
6a6e30a4
...
...
@@ -3,11 +3,13 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.base.CaseFormat
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldMapping
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationManageServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
io.swagger.annotations.Api
;
...
...
@@ -342,6 +344,7 @@ public class JgUseRegistrationManageController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/unitChange/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"单位变更分页查询"
,
notes
=
"单位变更分页查询"
)
@FieldMapping
({
@FieldMapping
.
FieldMap
(
sourceField
=
"useUnitSeq"
,
targetField
=
"originalUseUnitCreditCode"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitCreditInfoBySeq"
)})
public
ResponseModel
<
Page
<
JgUseRegistrationManageDto
>>
queryForUnitChangePage
(
JgUseRegistrationManageDto
dto
,
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@RequestParam
(
value
=
"current"
)
int
current
,
...
...
@@ -366,10 +369,11 @@ public class JgUseRegistrationManageController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/unitChangeByProjectContraption/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"单位变更选择工程/装置分页查询"
,
notes
=
"单位变更选择工程/装置分页查询"
)
@FieldMapping
({
@FieldMapping
.
FieldMap
(
sourceField
=
"useUnitSeq"
,
targetField
=
"originalUseUnitCreditCode"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitCreditInfoBySeq"
)})
public
ResponseModel
<
Page
<
IdxBizJgProjectContraption
>>
queryForUnitByProjectContraptionPage
(
@RequestParam
Map
<
String
,
String
>
params
,
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
IdxBizJgProjectContraption
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgVehicleInformationController.java
View file @
6a6e30a4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldMapping
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgVehicleInformationDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgVehicleInformation
;
import
com.yeejoin.amos.boot.module.jg.api.vo.JgVehicleInformationVo
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgVehicleInformationServiceImpl
;
import
org.typroject.tyboot.component.event.RestEventTrigger
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgVehicleInformationDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.component.event.RestEventTrigger
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
/**
* 车用气瓶控制类
...
...
@@ -48,6 +49,7 @@ public class JgVehicleInformationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增车用气瓶控制类"
,
notes
=
"新增车用气瓶控制类"
)
@FieldMapping
({
@FieldMapping
.
FieldMap
(
sourceField
=
"estateUnitSeq"
,
targetField
=
"estateUnitName"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitCreditInfoBySeq"
)})
public
ResponseModel
<
Object
>
saveOrSubmit
(
@RequestBody
JSONObject
map
,
@RequestParam
(
value
=
"submit"
)
String
submit
)
{
return
ResponseHelper
.
buildResponse
(
jgVehicleInformationServiceImpl
.
save
(
submit
,
map
));
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/ICommonService.java
View file @
6a6e30a4
...
...
@@ -36,7 +36,7 @@ public interface ICommonService {
List
<
LinkedHashMap
>
creatTree
();
List
<
Map
<
String
,
Object
>>
getUnitListByType
(
String
type
,
String
business
);
List
<
Map
<
String
,
Object
>>
getUnitListByType
(
String
type
,
String
business
,
Boolean
needAuth
);
/**
* 查询所有检验检测信息
...
...
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/CommonServiceImpl.java
View file @
6a6e30a4
...
...
@@ -19,6 +19,7 @@ import com.itextpdf.text.pdf.AcroFields;
import
com.itextpdf.text.pdf.BaseFont
;
import
com.itextpdf.text.pdf.PdfReader
;
import
com.itextpdf.text.pdf.PdfStamper
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldMapping
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
...
...
@@ -824,7 +825,7 @@ public class CommonServiceImpl implements ICommonService {
}
@Override
public
List
<
Map
<
String
,
Object
>>
getUnitListByType
(
String
type
,
String
business
)
{
public
List
<
Map
<
String
,
Object
>>
getUnitListByType
(
String
type
,
String
business
,
Boolean
needAuth
)
{
switch
(
type
)
{
case
"use"
:
...
...
@@ -858,7 +859,7 @@ public class CommonServiceImpl implements ICommonService {
List
<
DictionarieValueModel
>
result
=
Systemctl
.
dictionarieClient
.
dictValues
(
"OLD_USE_UNIT"
).
getResult
();
result
.
forEach
(
x
->
convertAndAddToUnitList
(
x
,
unitList
));
}
List
<
Map
<
String
,
Object
>>
unitListByType
=
commonMapper
.
getUnitListByType
(
type
);
List
<
Map
<
String
,
Object
>>
unitListByType
=
needAuth
?
commonMapper
.
getUnitInfoListByType
(
type
)
:
commonMapper
.
getUnitListByType
(
type
);
unitList
.
addAll
(
unitListByType
);
return
unitList
;
}
...
...
@@ -1372,6 +1373,9 @@ public class CommonServiceImpl implements ICommonService {
}
@Override
@FieldMapping
({
@FieldMapping
.
FieldMap
(
sourceField
=
"second.estateUnitSeq"
,
targetField
=
"second.estateUnitName"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitCreditInfoBySeq"
)
})
public
Object
invokeBusinessType
(
Map
<
String
,
Object
>
map
)
{
String
historyEquType
=
(
String
)
map
.
get
(
HISTORY_EQU_TYPE
);
JSONObject
jsonObject
=
new
JSONObject
((
Map
<
String
,
Object
>)
map
.
get
(
SECOND
));
...
...
@@ -2295,10 +2299,6 @@ public class CommonServiceImpl implements ICommonService {
formData
.
put
(
"type"
,
"SP_TT"
);
}
//如果是历史无证的修改类型为SP_TT并且枚举没有在登记类型中
if
(
Objects
.
isNull
(
RegistrationTypeEnum
.
getNameByType
(
formData
.
getString
(
"type"
)))
&&
"jg_his_black"
.
equals
(
formData
.
getString
(
"dataSource"
)))
{
formData
.
put
(
"type"
,
"SP_TT"
);
}
//登记类型
if
(
formData
.
containsKey
(
"type"
))
{
formData
.
put
(
"registrationType"
,
RegistrationTypeEnum
.
getNameByType
(
formData
.
getString
(
"type"
)));
...
...
@@ -3035,4 +3035,27 @@ public class CommonServiceImpl implements ICommonService {
}
return
commonMapper
.
isRegistrationNumberUsedByOtherUnits
(
useRegistrationCode
,
companyCode
);
}
/**
* 根据单位ID查询单位的信用代码及名称
* @param unitSeq 单位seq
* @return 单位信用代码_单位名称
*/
public
String
queryUnitCreditInfoBySeq
(
String
unitSeq
)
{
return
commonMapper
.
queryUnitCreditInfoBySeq
(
unitSeq
);
}
/**
* 根据单位信息查询单位seq
* @param unitInfo 单位信息
* @return 单位seq
*/
public
String
queryUnitInfoByCreditCode
(
String
unitInfo
)
{
if
(
StringUtils
.
isBlank
(
unitInfo
))
{
return
""
;
}
String
unitCreditCode
=
unitInfo
.
split
(
"_"
)[
0
];
return
commonMapper
.
queryUnitInfoByCreditCode
(
unitCreditCode
);
}
}
\ No newline at end of file
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 @
6a6e30a4
...
...
@@ -83,6 +83,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
// 设备基本信息表单id
private
static
final
String
EQUIP_INFO_FORM_ID
=
"equipInfo"
;
public
static
final
String
USE_UNIT_CREDIT_CODE
=
"useUnitCreditCode"
;
public
static
final
String
USE_UNIT_NAME
=
"useUnitName"
;
@Resource
private
IdxBizJgUseInfoServiceImpl
useInfoService
;
@Resource
...
...
@@ -252,11 +253,11 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
if
(!
StringUtils
.
isEmpty
(
street
)
&&
street
.
contains
(
"_"
)){
street
=
street
.
split
(
"_"
)[
0
];
}
//获取街道
String
useUnitCreditCode
=
params
.
get
(
USE_UNIT_CREDIT_CODE
);
if
(!
StringUtils
.
isEmpty
(
useUnitCreditCode
)
&&
useUnitCreditCode
.
contains
(
"_"
)){
useUnitCreditCode
=
useUnitCreditCode
.
split
(
"_"
)[
0
];
}
String
useUnitName
=
params
.
get
(
USE_UNIT_NAME
);
IPage
<
IdxBizJgProjectContraption
>
pageList
=
lambdaQuery
()
// 企业按照公司类型进行过滤
.
eq
(
BaseController
.
COMPANY_TYPE_COMPANY
.
equals
(
companyLevel
)
&&
CompanyTypeEnum
.
CONSTRUCTION
.
getName
().
equals
(
companyType
),
IdxBizJgProjectContraption:
:
getUscUnitCreditCode
,
companyCode
)
...
...
@@ -273,6 +274,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
.
eq
(!
ValidationUtil
.
isEmpty
(
county
),
IdxBizJgProjectContraption:
:
getCounty
,
county
)
.
eq
(!
ValidationUtil
.
isEmpty
(
street
),
IdxBizJgProjectContraption:
:
getStreet
,
street
)
.
eq
(!
ValidationUtil
.
isEmpty
(
useUnitCreditCode
),
IdxBizJgProjectContraption:
:
getUseUnitCreditCode
,
useUnitCreditCode
)
.
like
(!
ValidationUtil
.
isEmpty
(
useUnitName
),
IdxBizJgProjectContraption:
:
getUseUnitName
,
useUnitName
)
.
like
(!
ValidationUtil
.
isEmpty
(
projectContraption
),
IdxBizJgProjectContraption:
:
getProjectContraption
,
projectContraption
)
.
eq
(!
ValidationUtil
.
isEmpty
(
orgBranchCode
)
&&
BaseController
.
COMPANY_TYPE_COMPANY
.
equals
(
companyLevel
),
IdxBizJgProjectContraption:
:
getOrgCode
,
orgBranchCode
)
// 企业 等于匹配
.
likeRight
(!
ValidationUtil
.
isEmpty
(
orgBranchCode
)
&&
BaseController
.
COMPANY_TYPE_SUPERVISION
.
equals
(
companyLevel
),
IdxBizJgProjectContraption:
:
getOrgCode
,
orgBranchCode
)
// 监管 右模糊匹配
...
...
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 @
6a6e30a4
...
...
@@ -59,6 +59,7 @@ import org.elasticsearch.action.search.SearchResponse;
import
org.elasticsearch.client.RequestOptions
;
import
org.elasticsearch.client.RestHighLevelClient
;
import
org.elasticsearch.index.query.BoolQueryBuilder
;
import
org.elasticsearch.index.query.Operator
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.elasticsearch.search.SearchHit
;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
...
...
@@ -183,6 +184,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private
static
final
String
ATTACHMENT_UPLOAD
=
"attachmentUpload"
;
private
static
final
Map
<
String
,
String
>
regionCodeOrgCodeMap
=
new
ConcurrentHashMap
<>();
public
static
final
String
CAR_NUMBER
=
"CAR_NUMBER"
;
public
static
final
String
USE_UNIT_NAME
=
"USE_UNIT_NAME"
;
// 需要转化成jsonObject的附件字段
public
static
String
[]
jsonFields
=
{
"insOtherAccessories"
,
"installContractAttachment"
,
"installProxyStatementAttachment"
};
private
final
List
<
String
>
resultError
=
new
ArrayList
<>();
...
...
@@ -558,7 +560,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
//更新时工业管道(8300)检验检测信息
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
JSON
.
parseObject
(
toJSONString
(
pipeline
),
IdxBizJgInspectionDetectionInfo
.
class
);
if
(!
ValidationUtil
.
isEmpty
(
inspectionDetectionInfo
))
{
List
<
Map
<
String
,
Object
>>
inspectionAndTestingInstitutions
=
commonService
.
getUnitListByType
(
"inspection"
,
"gasCylindersForCars"
);
List
<
Map
<
String
,
Object
>>
inspectionAndTestingInstitutions
=
commonService
.
getUnitListByType
(
"inspection"
,
"gasCylindersForCars"
,
false
);
Optional
<
Map
<
String
,
Object
>>
optional
=
inspectionAndTestingInstitutions
.
stream
().
filter
(
x
->
x
.
get
(
"useCode"
).
equals
(
inspectionDetectionInfo
.
getInspectOrgCode
())).
findFirst
();
Map
<
String
,
Object
>
mapOrDefault
=
optional
.
orElse
(
Collections
.
emptyMap
());
inspectionDetectionInfo
.
setInspectOrgName
((
String
)
mapOrDefault
.
getOrDefault
(
"useUnit"
,
inspectionDetectionInfo
.
getInspectOrgName
()));
...
...
@@ -2533,7 +2535,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
else
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
))
||
!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"useUnitCreditCode"
)))
{
BoolQueryBuilder
uuccBuilder
=
QueryBuilders
.
boolQuery
();
String
uucc
=
!
ValidationUtil
.
isEmpty
(
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
))
?
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
)
:
map
.
getString
(
"useUnitCreditCode"
)
;
String
uucc
=
!
ValidationUtil
.
isEmpty
(
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
))
?
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
)
:
String
.
valueOf
(
map
.
get
(
"useUnitCreditCode"
)).
split
(
"_"
)[
0
]
;
String
param
=
QueryParser
.
escape
(
uucc
);
param
=
param
.
contains
(
"_"
)
?
param
.
split
(
"_"
)[
0
]
:
param
;
uuccBuilder
.
must
(
QueryBuilders
.
matchQuery
(
"USE_UNIT_CREDIT_CODE"
,
param
));
...
...
@@ -2644,6 +2646,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
pBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
"PRODUCE_UNIT_NAME"
,
"*"
+
QueryParser
.
escape
(
test
.
toLowerCase
())
+
"*"
));
boolMust
.
must
(
pBuilder
);
}
// 使用单位 名称模糊查询
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
USE_UNIT_NAME
)))
{
BoolQueryBuilder
pBuilder
=
QueryBuilders
.
boolQuery
();
String
text
=
map
.
getString
(
USE_UNIT_NAME
);
pBuilder
.
must
(
QueryBuilders
.
matchQuery
(
USE_UNIT_NAME
,
text
).
operator
(
Operator
.
AND
));
boolMust
.
must
(
pBuilder
);
}
// 模糊查询
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
USE_PLACE_CODE
)))
{
BoolQueryBuilder
pBuilder
=
QueryBuilders
.
boolQuery
();
...
...
@@ -2925,7 +2934,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
else
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
))
||
!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"useUnitCreditCode"
)))
{
BoolQueryBuilder
uuccBuilder
=
QueryBuilders
.
boolQuery
();
String
uucc
=
!
ValidationUtil
.
isEmpty
(
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
))
?
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
)
:
map
.
getString
(
"useUnitCreditCode"
)
;
String
uucc
=
!
ValidationUtil
.
isEmpty
(
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
))
?
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
)
:
String
.
valueOf
(
map
.
get
(
"useUnitCreditCode"
)).
split
(
"_"
)[
0
]
;
String
param
=
QueryParser
.
escape
(
uucc
);
param
=
param
.
contains
(
"_"
)
?
param
.
split
(
"_"
)[
0
]
:
param
;
uuccBuilder
.
must
(
QueryBuilders
.
matchQuery
(
"USE_UNIT_CREDIT_CODE"
,
param
));
...
...
@@ -3232,7 +3241,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
iIdxBizJgInspectionDetectionInfoService
.
saveOrUpdateData
(
inspectionDetectionInfo
);
}
else
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
equCategory
)
||
"2100"
.
equals
(
equCategory
))
{
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgInspectionDetectionInfo
.
class
);
List
<
Map
<
String
,
Object
>>
inspectionAndTestingInstitutions
=
commonService
.
getUnitListByType
(
"inspection"
,
"gasCylindersForCars"
);
List
<
Map
<
String
,
Object
>>
inspectionAndTestingInstitutions
=
commonService
.
getUnitListByType
(
"inspection"
,
"gasCylindersForCars"
,
false
);
Optional
<
Map
<
String
,
Object
>>
optional
=
inspectionAndTestingInstitutions
.
stream
().
filter
(
x
->
x
.
get
(
"useCode"
).
equals
(
inspectionDetectionInfo
.
getInspectOrgCode
())).
findFirst
();
Map
<
String
,
Object
>
mapOrDefault
=
optional
.
orElse
(
Collections
.
emptyMap
());
inspectionDetectionInfo
.
setInspectOrgName
((
String
)
mapOrDefault
.
getOrDefault
(
"useUnit"
,
inspectionDetectionInfo
.
getInspectOrgName
()));
...
...
@@ -3258,7 +3267,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
else
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
equCategory
)
||
"2100"
.
equals
(
equCategory
))
{
//更新时 固定式压力容器(2100)和 气瓶(2300)可以更新检验检测信息
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgInspectionDetectionInfo
.
class
);
List
<
Map
<
String
,
Object
>>
inspectionAndTestingInstitutions
=
commonService
.
getUnitListByType
(
"inspection"
,
"gasCylindersForCars"
);
List
<
Map
<
String
,
Object
>>
inspectionAndTestingInstitutions
=
commonService
.
getUnitListByType
(
"inspection"
,
"gasCylindersForCars"
,
false
);
Optional
<
Map
<
String
,
Object
>>
optional
=
inspectionAndTestingInstitutions
.
stream
().
filter
(
x
->
x
.
get
(
"useCode"
).
equals
(
inspectionDetectionInfo
.
getInspectOrgCode
())).
findFirst
();
Map
<
String
,
Object
>
mapOrDefault
=
optional
.
orElse
(
Collections
.
emptyMap
());
inspectionDetectionInfo
.
setInspectOrgName
((
String
)
mapOrDefault
.
getOrDefault
(
"useUnit"
,
inspectionDetectionInfo
.
getInspectOrgName
()));
...
...
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/JgCertificateReplenishServiceImpl.java
View file @
6a6e30a4
...
...
@@ -716,6 +716,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
.
like
(!
ValidationUtil
.
isEmpty
(
dto
.
getApplyNo
()),
JgCertificateReplenish:
:
getApplyNo
,
dto
.
getApplyNo
())
.
eq
(!
ValidationUtil
.
isEmpty
(
dto
.
getApplyStatus
()),
JgCertificateReplenish:
:
getApplyStatus
,
dto
.
getApplyStatus
())
.
eq
(!
ValidationUtil
.
isEmpty
(
dto
.
getUseUnitCode
()),
JgCertificateReplenish:
:
getUseUnitCode
,
dto
.
getUseUnitCode
())
.
like
(!
ValidationUtil
.
isEmpty
(
dto
.
getUseUnitName
()),
JgCertificateReplenish:
:
getUseUnitName
,
dto
.
getUseUnitName
())
.
eq
(!
ValidationUtil
.
isEmpty
(
dto
.
getApplicationReason
()),
JgCertificateReplenish:
:
getApplicationReason
,
dto
.
getApplicationReason
())
.
eq
(!
ValidationUtil
.
isEmpty
(
dto
.
getLossDamageTime
()),
JgCertificateReplenish:
:
getLossDamageTime
,
dto
.
getLossDamageTime
())
.
eq
(!
ValidationUtil
.
isEmpty
(
dto
.
getAcceptDate
()),
JgCertificateReplenish:
:
getAcceptDate
,
dto
.
getAcceptDate
())
...
...
@@ -834,7 +835,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
List
<
JSONObject
>
equipmentLists
=
this
.
queryEquByCert
(
registrationManage
.
getUseRegistrationCode
());
result
.
put
(
EQU_LISTS
,
equipmentLists
);
result
.
put
(
useRegistrationCode
,
registrationManage
.
getUseRegistrationCode
());
result
.
put
(
equUseAddress
,
registrationManage
.
getEquUseAddress
());
result
.
put
(
equUseAddress
,
StringUtils
.
isEmpty
(
registrationManage
.
getEquUseAddress
())?
""
:
registrationManage
.
getEquUseAddress
());
return
result
;
}
...
...
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/JgChangeRegistrationTransferServiceImpl.java
View file @
6a6e30a4
...
...
@@ -5,6 +5,8 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldMapping
;
import
com.yeejoin.amos.boot.biz.common.annotation.ResultFieldMapping
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -148,6 +150,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
*/
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@FieldMapping
({
@FieldMapping
.
FieldMap
(
paramIndex
=
1
,
sourceField
=
"notice.estateUnitSeq"
,
targetField
=
"transferUseInfo"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitCreditInfoBySeq"
)})
public
List
<
JgChangeRegistrationTransferDto
>
createTransfer
(
String
submitType
,
JSONObject
map
,
ReginParams
reginParams
)
{
try
{
Map
<
String
,
Object
>
tableData
=
(
Map
<
String
,
Object
>)
map
.
get
(
TABLE_PAGE_ID
);
...
...
@@ -600,6 +603,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
* @return
*/
@Override
@ResultFieldMapping
({
@ResultFieldMapping
.
ResultFieldMap
(
sourceField
=
"changeRegistrationTransfer.transferUseInfo"
,
targetField
=
"changeRegistrationTransfer.estateUnitSeq"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitInfoByCreditCode"
)})
public
Map
<
String
,
Map
<
String
,
Object
>>
getTransferDetail
(
String
sequenceNbr
)
{
Map
<
String
,
Map
<
String
,
Object
>>
pageDataMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultDataMap
=
new
HashMap
<>();
...
...
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/JgChangeRegistrationUnitServiceImpl.java
View file @
6a6e30a4
...
...
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.annotation.ResultFieldMapping
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
...
...
@@ -39,7 +40,6 @@ import com.yeejoin.amos.feign.systemctl.model.TaskV2Model;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.*
;
import
io.seata.spring.annotation.GlobalTransactional
;
import
lombok.var
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.redisson.api.RLock
;
import
org.redisson.api.RedissonClient
;
...
...
@@ -192,6 +192,9 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
* @return 单位变更
*/
@Override
@ResultFieldMapping
({
@ResultFieldMapping
.
ResultFieldMap
(
sourceField
=
"changeRegisInfo.useUnitCreditCode"
,
targetField
=
"changeRegisInfo.useUnitSeq"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitInfoByCreditCode"
)
})
public
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
,
ReginParams
selectedOrgInfo
)
{
// 单位变更信息
JgChangeRegistrationUnit
notice
=
JgChangeRegistrationUnitMapper
.
selectById
(
sequenceNbr
);
...
...
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/JgChangeVehicleRegistrationUnitServiceImpl.java
View file @
6a6e30a4
...
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.annotation.ResultFieldMapping
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
...
...
@@ -829,6 +830,9 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
return
Boolean
.
TRUE
;
}
@ResultFieldMapping
({
@ResultFieldMapping
.
ResultFieldMap
(
sourceField
=
"useUnitCreditCode"
,
targetField
=
"useUnitSeq"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitInfoByCreditCode"
)
})
public
Map
<
String
,
Object
>
getDetails
(
String
sequenceNbr
,
ReginParams
selectedOrgInfo
)
{
JgChangeVehicleRegistrationUnit
registrationUnit
=
this
.
getById
(
sequenceNbr
);
this
.
doCompensate
(
registrationUnit
);
...
...
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/JgInstallationNoticeServiceImpl.java
View file @
6a6e30a4
...
...
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.github.pagehelper.util.StringUtil
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.annotation.ResultFieldMapping
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper
;
...
...
@@ -209,6 +210,10 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
* @return 安装告知
*/
@Override
@ResultFieldMapping
({
@ResultFieldMapping
.
ResultFieldMap
(
sourceField
=
"installationInfo.useUnitCreditCode"
,
targetField
=
"installationInfo.useUnitSeq"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitInfoByCreditCode"
),
@ResultFieldMapping
.
ResultFieldMap
(
sourceField
=
"installationInfo.propertyUnitName"
,
targetField
=
"installationInfo.propertyUnitSeq"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitInfoByCreditCode"
)
})
public
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
,
String
companyLevel
)
{
// 安装告知信息
JgInstallationNotice
notice
=
jgInstallationNoticeMapper
.
selectById
(
sequenceNbr
);
...
...
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/JgMaintainNoticeServiceImpl.java
View file @
6a6e30a4
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.annotation.ResultFieldMapping
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
...
...
@@ -162,6 +163,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
* @return 维修告知
*/
@Override
@ResultFieldMapping
({
@ResultFieldMapping
.
ResultFieldMap
(
sourceField
=
"maintainInfo.useUnitCreditCode"
,
targetField
=
"maintainInfo.useUnitSeq"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitInfoByCreditCode"
),
})
public
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
// 维修告知信息
JgMaintainNotice
notice
=
jgMaintainNoticeMapper
.
selectById
(
sequenceNbr
);
...
...
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/JgReformNoticeServiceImpl.java
View file @
6a6e30a4
...
...
@@ -10,14 +10,15 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.util.StringUtil
;
import
com.yeejoin.amos.boot.biz.common.annotation.ResultFieldMapping
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
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.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
...
...
@@ -55,7 +56,6 @@ import lombok.extern.slf4j.Slf4j;
import
org.redisson.api.RLock
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.support.TransactionSynchronization
;
...
...
@@ -147,6 +147,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
* @return 改造告知
*/
@Override
@ResultFieldMapping
({
@ResultFieldMapping
.
ResultFieldMap
(
sourceField
=
"useUnitCreditCode"
,
targetField
=
"useUnitSeq"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitInfoByCreditCode"
),
})
public
Map
<
String
,
Object
>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
// 改造告知信息
JgReformNotice
notice
=
jgReformNoticeMapper
.
selectById
(
sequenceNbr
);
...
...
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/JgTransferNoticeServiceImpl.java
View file @
6a6e30a4
...
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.util.StringUtil
;
import
com.yeejoin.amos.boot.biz.common.annotation.ResultFieldMapping
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
...
...
@@ -128,6 +129,9 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
* @return 移装告知
*/
@Override
@ResultFieldMapping
({
@ResultFieldMapping
.
ResultFieldMap
(
sourceField
=
"transferNoticeInfo.useUnitCreditCode"
,
targetField
=
"transferNoticeInfo.useUnitSeq"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitInfoByCreditCode"
),
})
public
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
,
String
companyLevel
)
{
// 移装告知信息
JgTransferNotice
notice
=
jgTransferNoticeMapper
.
selectById
(
sequenceNbr
);
...
...
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 @
6a6e30a4
...
...
@@ -15,6 +15,8 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.annotation.FieldMapping
;
import
com.yeejoin.amos.boot.biz.common.annotation.ResultFieldMapping
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
...
...
@@ -2159,6 +2161,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
@ResultFieldMapping
({
@ResultFieldMapping
.
ResultFieldMap
(
sourceField
=
"estateUnitName"
,
targetField
=
"estateUnitSeq"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitInfoByCreditCode"
)
})
public
Map
<
String
,
Object
>
getDetail
(
String
record
,
Long
sequenceNbr
,
ReginParams
selectedOrgInfo
)
{
if
(!
ObjectUtils
.
isEmpty
(
sequenceNbr
))
{
JgUseRegistration
jgUseRegistration
=
this
.
getBaseMapper
().
selectById
(
sequenceNbr
);
...
...
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/JgVehicleInformationServiceImpl.java
View file @
6a6e30a4
...
...
@@ -5,7 +5,6 @@ import cn.hutool.core.collection.CollUtil;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
...
...
@@ -13,6 +12,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.yeejoin.amos.boot.biz.common.annotation.ResultFieldMapping
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
...
...
@@ -593,7 +593,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
* @param selectedOrgInfo
* @return JgVehicleInformationModel
*/
public
JgVehicleInformationVo
queryBySequenceNbr
(
Long
sequenceNbr
,
ReginParams
selectedOrgInfo
)
{
@ResultFieldMapping
({
@ResultFieldMapping
.
ResultFieldMap
(
sourceField
=
"estateUnitName"
,
targetField
=
"estateUnitSeq"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryUnitInfoByCreditCode"
)})
public
JgVehicleInformationVo
queryBySequenceNbr
(
Long
sequenceNbr
,
ReginParams
selectedOrgInfo
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()))
+
""
,
ReginParams
.
class
);
JgVehicleInformationVo
vo
=
new
JgVehicleInformationVo
();
JgVehicleInformationDto
dto
=
this
.
baseMapper
.
queryBySequenceNbr
(
sequenceNbr
);
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/service/ITzsUserInfoService.java
View file @
6a6e30a4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
...
...
@@ -40,6 +41,10 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
Boolean
personnelTransferOut
(
String
userSeqNbrs
);
JSONObject
statisticsOfPersonnelTypes
(
String
type
);
JSONObject
statisticsOfPersonnelTypesByPatentCode
(
String
parentId
);
Map
<
String
,
Integer
>
getArrangementStatistic
(
String
companyCode
);
Map
<
String
,
Object
>
getCompanyType
();
...
...
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 @
6a6e30a4
...
...
@@ -377,8 +377,22 @@ public class TzsUserInfoController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/statisticsOfPersonnelTypes"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"人员类型统计"
,
notes
=
"人员类型统计"
)
public
ResponseModel
<
JSONObject
>
statisticsOfPersonnelTypes
(
@RequestParam
(
value
=
"type"
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
statisticsOfPersonnelTypes
(
type
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/statisticsOfPersonnelTypesByPatentCode"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"人员类型统计"
,
notes
=
"人员类型统计"
)
public
ResponseModel
<
JSONObject
>
statisticsOfPersonnelTypesByPatentCode
(
@RequestParam
(
value
=
"parentId"
)
String
parentId
)
{
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
statisticsOfPersonnelTypesByPatentCode
(
parentId
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/historicalOperatorHandling"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"
需求3309 人员管理调整后:历史的维保人员(作业人员含电梯维修资质的刷入子类型:持证人员)"
,
notes
=
"
需求3309 人员管理调整后:历史的维保人员(作业人员含电梯维修资质的刷入子类型:持证人员)"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"
【调用一次即可】需求3309 人员管理调整后:历史的维保人员(作业人员含电梯维修资质的刷入子类型:持证人员)"
,
notes
=
"【调用一次即可】
需求3309 人员管理调整后:历史的维保人员(作业人员含电梯维修资质的刷入子类型:持证人员)"
)
public
ResponseModel
<
Object
>
historicalOperatorHandling
()
{
// userinfo表中旧的post字段保存了旧字典值6618(维保人员)
List
<
Long
>
sesqNbrs
=
tzsUserInfoService
.
getBaseMapper
()
...
...
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 @
6a6e30a4
...
...
@@ -80,6 +80,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
// 平台用户锁定状态
private
final
String
UNLOCK
=
"UNLOCK"
;
private
final
String
LOCK
=
"LOCK"
;
private
final
String
TOTALTYPESTEMPLATE
=
"{\"records\":[{\"name\":\"人员总数(人)\",\"value\":%s}]}"
;
@Autowired
DataDictionaryServiceImpl
iDataDictionaryService
;
@Autowired
...
...
@@ -755,6 +756,74 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
return
Boolean
.
TRUE
;
}
@Override
public
JSONObject
statisticsOfPersonnelTypes
(
String
type
)
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
companyCode
=
reginParams
.
getCompany
().
getCompanyCode
();
if
(
"total"
.
equals
(
type
))
{
int
total
=
tzsUserInfoMapper
.
selectList
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
.
select
(
TzsUserInfo:
:
getSequenceNbr
)
.
eq
(
TzsUserInfo:
:
getUnitCode
,
companyCode
)
.
eq
(
TzsUserInfo:
:
getIsDelete
,
Boolean
.
FALSE
)
).
size
();
return
JSONObject
.
parseObject
(
String
.
format
(
TOTALTYPESTEMPLATE
,
total
));
}
else
if
(
"subType"
.
equals
(
type
))
{
ArrayList
<
JSONObject
>
jsonObjects
=
this
.
getSubTypeCount
(
companyCode
);
return
new
JSONObject
().
fluentPut
(
"records"
,
jsonObjects
);
}
return
null
;
}
@Override
public
JSONObject
statisticsOfPersonnelTypesByPatentCode
(
String
parentId
)
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
companyCode
=
reginParams
.
getCompany
().
getCompanyCode
();
DataDictionary
dictionary
=
iDataDictionaryService
.
getBaseMapper
().
selectOne
(
new
LambdaQueryWrapper
<
DataDictionary
>().
select
(
DataDictionary:
:
getCode
,
DataDictionary:
:
getName
).
eq
(
DataDictionary:
:
getCode
,
parentId
));
ArrayList
<
String
>
seriesData
=
new
ArrayList
<>();
ArrayList
<
String
>
axisData
=
new
ArrayList
<>();
iDataDictionaryService
.
getBaseMapper
().
selectList
(
new
LambdaQueryWrapper
<
DataDictionary
>()
.
select
(
DataDictionary:
:
getName
,
DataDictionary:
:
getCode
)
.
eq
(
DataDictionary:
:
getParent
,
parentId
))
.
forEach
(
item
->
{
axisData
.
add
(
item
.
getName
()
+
"(人)"
);
int
size
=
tzsUserInfoMapper
.
selectList
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
.
select
(
TzsUserInfo:
:
getSequenceNbr
)
.
eq
(
TzsUserInfo:
:
getUnitCode
,
companyCode
)
.
like
(
TzsUserInfo:
:
getSubPost
,
item
.
getCode
())
.
eq
(
TzsUserInfo:
:
getIsDelete
,
Boolean
.
FALSE
)
).
size
();
seriesData
.
add
(
Objects
.
toString
(
size
));
});
return
new
JSONObject
().
fluentPut
(
"records"
,
Arrays
.
asList
(
new
JSONObject
()
.
fluentPut
(
"name"
,
dictionary
.
getName
()+
"(人)"
)
.
fluentPut
(
"value"
,
tzsUserInfoMapper
.
selectList
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
.
select
(
TzsUserInfo:
:
getSequenceNbr
)
.
eq
(
TzsUserInfo:
:
getUnitCode
,
companyCode
)
.
like
(
TzsUserInfo:
:
getNewPost
,
dictionary
.
getCode
())
.
eq
(
TzsUserInfo:
:
getIsDelete
,
Boolean
.
FALSE
)
).
size
())
.
fluentPut
(
"seriesData"
,
seriesData
)
.
fluentPut
(
"axisData"
,
axisData
)));
}
private
ArrayList
<
JSONObject
>
getSubTypeCount
(
String
companyCode
)
{
List
<
DataDictionary
>
allUserType
=
this
.
getAllUserType
();
ArrayList
<
JSONObject
>
jsonObjects
=
new
ArrayList
<>();
allUserType
.
forEach
(
item
->
{
String
postCode
=
item
.
getCode
();
int
size
=
tzsUserInfoMapper
.
selectList
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
.
select
(
TzsUserInfo:
:
getSequenceNbr
)
.
eq
(
TzsUserInfo:
:
getUnitCode
,
companyCode
)
.
like
(
TzsUserInfo:
:
getNewPost
,
postCode
)
.
eq
(
TzsUserInfo:
:
getIsDelete
,
Boolean
.
FALSE
)
).
size
();
jsonObjects
.
add
(
new
JSONObject
().
fluentPut
(
"name"
,
item
.
getName
()
+
"(人)"
).
fluentPut
(
"value"
,
size
));
});
return
jsonObjects
;
}
public
List
<
LinkedHashMap
>
screenData
(
List
<
LinkedHashMap
>
result
,
List
<
LinkedHashMap
>
data
,
String
id
)
{
if
(!
ObjectUtils
.
isEmpty
(
result
))
{
return
result
;
...
...
@@ -897,33 +966,33 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
throw
new
BadRequest
(
"未指定人员归属单位信息"
);
}
if
(
!
ObjectUtils
.
isEmpty
(
tzsUserInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
if
(
tzsUserInfoMapper
.
selectCount
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
.
eq
(
TzsUserInfo:
:
getCertificateType
,
tzsUserInfo
.
getCertificateType
())
.
eq
(
TzsUserInfo:
:
getCertificateNum
,
tzsUserInfo
.
getCertificateNum
())
.
eq
(
TzsUserInfo:
:
getUnitCode
,
companyModel
.
getCompanyCode
())
.
eq
(
TzsUserInfo:
:
getIsDelete
,
false
))
)
)
{
.
eq
(
TzsUserInfo:
:
getIsDelete
,
false
))
>
0
)
{
throw
new
BadRequest
(
"本单位下用户证件号码重复,请核对!"
);
}
if
(
!
ObjectUtils
.
isEmpty
(
tzsUserInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
if
(
tzsUserInfoMapper
.
selectCount
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
.
eq
(
TzsUserInfo:
:
getCertificateType
,
tzsUserInfo
.
getCertificateType
())
.
eq
(
TzsUserInfo:
:
getCertificateNum
,
tzsUserInfo
.
getCertificateNum
())
.
ne
(
TzsUserInfo:
:
getUnitCode
,
companyModel
.
getCompanyCode
())
.
eq
(
TzsUserInfo:
:
getIsDelete
,
false
))
)
)
{
.
eq
(
TzsUserInfo:
:
getIsDelete
,
false
))
>
0
)
{
throw
new
BadRequest
(
"该用户已被其他单位绑定,请联系原单位转出!"
);
}
if
(
!
ObjectUtils
.
isEmpty
(
tzsUserInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
if
(
tzsUserInfoMapper
.
selectCount
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
.
eq
(
TzsUserInfo:
:
getUnitCode
,
companyModel
.
getCompanyCode
())
.
eq
(
TzsUserInfo:
:
getPhone
,
tzsUserInfo
.
getPhone
())
.
eq
(
TzsUserInfo:
:
getIsDelete
,
false
))
)
)
{
.
eq
(
TzsUserInfo:
:
getIsDelete
,
false
))
>
0
)
{
throw
new
BadRequest
(
"本单位下用户联系电话重复,请核对!"
);
}
if
(
!
ObjectUtils
.
isEmpty
(
tzsUserInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
if
(
tzsUserInfoMapper
.
selectCount
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
.
ne
(
TzsUserInfo:
:
getUnitCode
,
companyModel
.
getCompanyCode
())
.
eq
(
TzsUserInfo:
:
getPhone
,
tzsUserInfo
.
getPhone
())
.
eq
(
TzsUserInfo:
:
getIsDelete
,
false
))
)
)
{
.
eq
(
TzsUserInfo:
:
getIsDelete
,
false
))
>
0
)
{
throw
new
BadRequest
(
"该用户手机号已被其他单位人员绑定!"
);
}
...
...
@@ -977,33 +1046,35 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
throw
new
BadRequest
(
"未指定人员归属单位信息"
);
}
if
(
!
ObjectUtils
.
isEmpty
(
tzsUserInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
if
(
tzsUserInfoMapper
.
selectCount
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
.
eq
(
TzsUserInfo:
:
getCertificateType
,
tzsUserInfoDto
.
getCertificateType
())
.
ne
(
TzsUserInfo:
:
getSequenceNbr
,
rowId
)
.
eq
(
TzsUserInfo:
:
getCertificateNum
,
tzsUserInfoDto
.
getCertificateNum
())
.
eq
(
TzsUserInfo:
:
getUnitCode
,
companyModel
.
getCompanyCode
())
.
eq
(
TzsUserInfo:
:
getIsDelete
,
false
))
)
)
{
.
eq
(
TzsUserInfo:
:
getIsDelete
,
false
))
>
0
)
{
throw
new
BadRequest
(
"本单位下用户证件号码重复,请核对!"
);
}
if
(
!
ObjectUtils
.
isEmpty
(
tzsUserInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
if
(
tzsUserInfoMapper
.
selectCount
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
.
eq
(
TzsUserInfo:
:
getCertificateType
,
tzsUserInfoDto
.
getCertificateType
())
.
eq
(
TzsUserInfo:
:
getCertificateNum
,
tzsUserInfoDto
.
getCertificateNum
())
.
ne
(
TzsUserInfo:
:
getUnitCode
,
companyModel
.
getCompanyCode
())
.
eq
(
TzsUserInfo:
:
getIsDelete
,
false
))
)
)
{
.
eq
(
TzsUserInfo:
:
getIsDelete
,
false
))
>
0
)
{
throw
new
BadRequest
(
"该用户已被其他单位绑定,请联系原单位转出!"
);
}
if
(
!
ObjectUtils
.
isEmpty
(
tzsUserInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
if
(
tzsUserInfoMapper
.
selectCount
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
.
eq
(
TzsUserInfo:
:
getUnitCode
,
companyModel
.
getCompanyCode
())
.
ne
(
TzsUserInfo:
:
getSequenceNbr
,
rowId
)
.
eq
(
TzsUserInfo:
:
getPhone
,
tzsUserInfoDto
.
getPhone
())
.
eq
(
TzsUserInfo:
:
getIsDelete
,
false
))
)
)
{
.
eq
(
TzsUserInfo:
:
getIsDelete
,
false
))
>
0
)
{
throw
new
BadRequest
(
"本单位下用户联系电话重复,请核对!"
);
}
if
(
!
ObjectUtils
.
isEmpty
(
tzsUserInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
if
(
tzsUserInfoMapper
.
selectCount
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
.
ne
(
TzsUserInfo:
:
getUnitCode
,
companyModel
.
getCompanyCode
())
.
eq
(
TzsUserInfo:
:
getPhone
,
tzsUserInfoDto
.
getPhone
())
.
eq
(
TzsUserInfo:
:
getIsDelete
,
false
))
)
)
{
.
eq
(
TzsUserInfo:
:
getIsDelete
,
false
))
>
0
)
{
throw
new
BadRequest
(
"该用户手机号已被其他单位人员绑定!"
);
}
...
...
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 @
6a6e30a4
...
...
@@ -2604,10 +2604,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
List
<
ESEquipmentCategoryDto
>
saveList
=
new
ArrayList
<>();
// 批量获取旧数据
for
(
String
record
:
paramMap
.
keySet
())
{
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategory
.
findById
(
record
);
optional
.
ifPresent
(
dto
->
oldDataMap
.
put
(
record
,
dto
));
}
// for (String record : paramMap.keySet()) {
// Optional<ESEquipmentCategoryDto> optional = esEquipmentCategory.findById(record);
// optional.ifPresent(dto -> oldDataMap.put(record, dto));
// }
Iterable
<
ESEquipmentCategoryDto
>
optiona
=
esEquipmentCategory
.
findAllById
(
paramMap
.
keySet
());
optiona
.
forEach
(
dto
->
oldDataMap
.
put
(
dto
.
getSEQUENCE_NBR
(),
dto
));
for
(
Map
.
Entry
<
String
,
Map
<
String
,
Object
>>
entry
:
paramMap
.
entrySet
())
{
String
record
=
entry
.
getKey
();
...
...
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