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
06d54e81
Commit
06d54e81
authored
Feb 19, 2024
by
刘林
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
56499d93
ab451bef
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
109 additions
and
16 deletions
+109
-16
JgScrapCancelDto.java
...yeejoin/amos/boot/module/jg/api/dto/JgScrapCancelDto.java
+10
-0
JgScrapCancel.java
...yeejoin/amos/boot/module/jg/api/entity/JgScrapCancel.java
+18
-0
JgScrapCancelServiceImpl.java
.../module/jg/biz/service/impl/JgScrapCancelServiceImpl.java
+3
-0
BizCommonConstant.java
...in/amos/boot/module/tcm/api/common/BizCommonConstant.java
+5
-0
RegUnitInfoDto.java
...join/amos/boot/module/tcm/flc/api/dto/RegUnitInfoDto.java
+3
-0
UnitDataSourceEnum.java
...mos/boot/module/tcm/flc/api/enums/UnitDataSourceEnum.java
+28
-0
IUnitInfoService.java
...mos/boot/module/tcm/flc/api/service/IUnitInfoService.java
+3
-1
AmosTcmApplication.java
...iz/src/main/java/com/yeejoin/amos/AmosTcmApplication.java
+3
-1
UnitInfoController.java
...oot/module/tcm/flc/biz/controller/UnitInfoController.java
+11
-3
RegUnitInfoServiceImpl.java
...dule/tcm/flc/biz/service/impl/RegUnitInfoServiceImpl.java
+7
-1
UnitInfoServiceImpl.java
.../module/tcm/flc/biz/service/impl/UnitInfoServiceImpl.java
+18
-10
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgScrapCancelDto.java
View file @
06d54e81
...
...
@@ -112,4 +112,14 @@ public class JgScrapCancelDto extends BaseDto {
@ApiModelProperty
(
value
=
"设备代号"
)
private
String
equList
;
@ApiModelProperty
(
value
=
"设备类别"
)
private
String
equCategoryDesc
;
@ApiModelProperty
(
value
=
"设备名称"
)
private
String
productName
;
@ApiModelProperty
(
value
=
"设备地址"
)
private
String
fullAddress
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgScrapCancel.java
View file @
06d54e81
...
...
@@ -30,6 +30,12 @@ public class JgScrapCancel extends BaseEntity {
private
String
cancelType
;
/**
* 注销类型(1报废注销,2移装注销)
*/
@TableField
(
exist
=
false
)
private
String
cancelTypeDesc
;
/**
* 申请编号
*/
@TableField
(
"apply_no"
)
...
...
@@ -157,4 +163,16 @@ public class JgScrapCancel extends BaseEntity {
@TableField
(
exist
=
false
)
private
String
equList
;
@TableField
(
exist
=
false
)
private
String
equListDesc
;
@TableField
(
exist
=
false
)
private
String
equCategoryDesc
;
@TableField
(
exist
=
false
)
private
String
productName
;
@TableField
(
exist
=
false
)
private
String
fullAddress
;
}
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/JgScrapCancelServiceImpl.java
View file @
06d54e81
...
...
@@ -244,6 +244,9 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
this
.
createTaskModel
(
jgScrapCancel
,
taskName
[
0
],
submitType
,
nextUserIds
);
jgRelationEquip
.
setEquipTransferId
(
String
.
valueOf
(
jgScrapCancel
.
getSequenceNbr
()));
jgScrapCancelEqService
.
save
(
jgRelationEquip
);
String
equListName
=
EquipmentClassifityEnum
.
getNameByCode
(
jgScrapCancel
.
getEquList
());
jgScrapCancel
.
setEquListDesc
(
equListName
);
jgScrapCancel
.
setCancelTypeDesc
(
"1"
.
equals
(
jgScrapCancel
.
getCancelType
())
?
"报废注销"
:
"移装注销"
);
return
jgScrapCancel
;
}
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/common/BizCommonConstant.java
View file @
06d54e81
...
...
@@ -17,6 +17,11 @@ public interface BizCommonConstant {
*/
String
REGION_TREE_REDIS_KEY
=
"REGION_TREE_TCM"
;
/**
* 全国所有区划企业数据redisKey
*/
String
NATIONAL_REGION_TREE_REDIS_KEY
=
"NATIONAL_REGION_TREE_TCM"
;
/**
* 企业类型数据redisKey
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/flc/api/dto/RegUnitInfoDto.java
View file @
06d54e81
...
...
@@ -142,4 +142,7 @@ public class RegUnitInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"注册类型"
)
private
String
registerType
;
@ApiModelProperty
(
value
=
"单位所在地是否为全国"
)
private
String
isNationwide
;
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/flc/api/enums/UnitDataSourceEnum.java
0 → 100644
View file @
06d54e81
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
flc
.
api
.
enums
;
import
lombok.Getter
;
/**
* 企业数据来源
* @author Administrator
*/
@Getter
public
enum
UnitDataSourceEnum
{
/**
* 单位审核状态
*/
NATIONAL
(
"省外企业"
,
"1"
),
SHAANXI
(
"陕西省内企业"
,
"0"
);
private
String
name
;
private
String
code
;
UnitDataSourceEnum
(
String
name
,
String
code
){
this
.
name
=
name
;
this
.
code
=
code
;
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/flc/api/service/IUnitInfoService.java
View file @
06d54e81
...
...
@@ -47,7 +47,9 @@ public interface IUnitInfoService {
/**
* 单位树
* @param parentId 上级行政区划ID
* @param isNationwide 是否全国范围行政区划 null默认陕西省内,1全国
* @return Collection<RegionModel>
*/
Collection
<
RegionModel
>
getRegionTree
(
Long
parentId
);
Collection
<
RegionModel
>
getRegionTree
(
Long
parentId
,
String
isNationwide
);
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/AmosTcmApplication.java
View file @
06d54e81
...
...
@@ -140,8 +140,10 @@ public class AmosTcmApplication {
//4.区域放redis缓存(依赖1)
//4.1先删除缓存
redisUtil
.
del
(
BizCommonConstant
.
REGION_TREE_REDIS_KEY
);
redisUtil
.
del
(
BizCommonConstant
.
NATIONAL_REGION_TREE_REDIS_KEY
);
//4.2再初始化
unitInfoService
.
getAllRegionTree
();
unitInfoService
.
getAllRegionTree
(
null
);
// 陕西省
unitInfoService
.
getAllRegionTree
(
"1"
);
// 全国
//5.企业类型放redis缓存(依赖1)
//5.1先删除缓存
redisUtil
.
del
(
BizCommonConstant
.
UNIT_TYPE_LIST_REDIS_KEY
);
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/flc/biz/controller/UnitInfoController.java
View file @
06d54e81
...
...
@@ -97,15 +97,23 @@ public class UnitInfoController extends BaseController {
*
* @return
*/
//@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@TycloudOperation
(
ApiLevel
=
UserType
.
ANONYMOUS
,
needAuth
=
false
)
@GetMapping
(
value
=
"/region/tree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取组织机构树"
,
notes
=
"获取组织机构树"
)
public
ResponseModel
<
Collection
<
RegionModel
>>
getRegionTree
(
@RequestParam
(
value
=
"parentId"
,
required
=
false
)
Long
parentId
)
{
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
getRegionTree
(
parentId
));
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
getRegionTree
(
parentId
,
null
));
}
/**
* 获取全国行政区划树
*
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
ANONYMOUS
,
needAuth
=
false
)
@GetMapping
(
value
=
"/national/region/tree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取全国行政区划树"
,
notes
=
"获取全国行政区划树"
)
public
ResponseModel
<
Collection
<
RegionModel
>>
getNationalRegionTree
(
@RequestParam
(
value
=
"parentId"
,
required
=
false
)
Long
parentId
,
@RequestParam
(
value
=
"isNationwide"
,
required
=
false
)
String
isNationwide
)
{
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
getRegionTree
(
parentId
,
isNationwide
));
}
/**
* 获取管辖单位树
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/flc/biz/service/impl/RegUnitInfoServiceImpl.java
View file @
06d54e81
...
...
@@ -33,6 +33,7 @@ import com.yeejoin.amos.boot.module.tcm.flc.api.dto.RegUnitIcDto;
import
com.yeejoin.amos.boot.module.tcm.flc.api.dto.RegUnitInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.flc.api.entity.RegUnitIc
;
import
com.yeejoin.amos.boot.module.tcm.flc.api.entity.RegUnitInfo
;
import
com.yeejoin.amos.boot.module.tcm.flc.api.enums.UnitDataSourceEnum
;
import
com.yeejoin.amos.boot.module.tcm.flc.api.feign.AccessFeignService
;
import
com.yeejoin.amos.boot.module.tcm.flc.api.feign.IdxFeignService
;
import
com.yeejoin.amos.boot.module.tcm.flc.api.feign.UgpServiceFeignClient
;
...
...
@@ -353,7 +354,12 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
// 这个表有两个字段所以赋值两字段
baseEnterpriseInfo
.
setSuperviseOrgName
(
regUnitInfo
.
getManagementUnit
());
baseEnterpriseInfo
.
setGoverningBody
(
regUnitInfo
.
getManagementUnit
());
baseEnterpriseInfo
.
setDataSources
(
"企业注册"
);
if
(
UnitDataSourceEnum
.
NATIONAL
.
getCode
().
equals
(
regUnitInfo
.
getIsNationwide
()))
{
baseEnterpriseInfo
.
setDataSources
(
UnitDataSourceEnum
.
NATIONAL
.
getName
());
}
else
{
baseEnterpriseInfo
.
setDataSources
(
UnitDataSourceEnum
.
SHAANXI
.
getName
());
}
baseEnterpriseInfo
.
setRegisterType
(
Objects
.
requireNonNull
(
EnterpriseEnums
.
getEnumByType
(
type
).
getTypeName
()));
if
(
type
.
equals
(
EnterpriseEnums
.
QY_DW
.
getType
())){
baseEnterpriseInfo
.
setIndustry
(
regUnitInfo
.
getRegUnitIc
().
getIndustryName
());
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/flc/biz/service/impl/UnitInfoServiceImpl.java
View file @
06d54e81
...
...
@@ -101,6 +101,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
@Autowired
private
RedisUtil
redisUtil
;
@Value
(
"${shaanxi.region.seq:1402458558599125040}"
)
private
Long
shaanxiRegionSeq
;
@Transactional
...
...
@@ -639,11 +641,11 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
}
@Override
public
Collection
<
RegionModel
>
getRegionTree
(
Long
parentId
)
{
public
Collection
<
RegionModel
>
getRegionTree
(
Long
parentId
,
String
isNationwide
)
{
tzsAuthServiceImpl
.
setRequestContext
();
Collection
<
RegionModel
>
result
=
null
;
if
(
parentId
==
null
)
{
result
=
this
.
getAllRegionTree
();
result
=
this
.
getAllRegionTree
(
isNationwide
);
}
else
{
result
=
Systemctl
.
regionClient
.
querySubAgencyTree
(
parentId
).
getResult
();
}
...
...
@@ -651,20 +653,26 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
return
result
;
}
public
Collection
<
RegionModel
>
getAllRegionTree
()
{
public
Collection
<
RegionModel
>
getAllRegionTree
(
String
isNationwide
)
{
Collection
<
RegionModel
>
result
;
// isNationwide = null 获取陕西省行政区划,其他获取全国行政区划
String
regionTreeRedisKey
=
ValidationUtil
.
isEmpty
(
isNationwide
)
?
BizCommonConstant
.
REGION_TREE_REDIS_KEY
:
BizCommonConstant
.
NATIONAL_REGION_TREE_REDIS_KEY
;
// 先从Redis缓存中获取值
if
(
redisUtil
.
hasKey
(
BizCommonConstant
.
REGION_TREE_REDIS_KEY
))
{
result
=
JSONObject
.
parseArray
(
redisUtil
.
get
(
BizCommonConstant
.
REGION_TREE_REDIS_KEY
).
toString
(),
RegionModel
.
class
);
if
(
redisUtil
.
hasKey
(
regionTreeRedisKey
))
{
result
=
JSONObject
.
parseArray
(
redisUtil
.
get
(
regionTreeRedisKey
).
toString
(),
RegionModel
.
class
);
return
result
;
}
// 在同步块内再次检查缓存,以避免多个线程同时查不到缓存时重复查询数据库
synchronized
(
this
)
{
if
(
redisUtil
.
hasKey
(
BizCommonConstant
.
REGION_TREE_REDIS_KEY
))
{
result
=
JSONObject
.
parseArray
(
redisUtil
.
get
(
BizCommonConstant
.
REGION_TREE_REDIS_KEY
).
toString
(),
RegionModel
.
class
);
if
(
redisUtil
.
hasKey
(
regionTreeRedisKey
))
{
result
=
JSONObject
.
parseArray
(
redisUtil
.
get
(
regionTreeRedisKey
).
toString
(),
RegionModel
.
class
);
}
else
{
result
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
redisUtil
.
set
(
BizCommonConstant
.
REGION_TREE_REDIS_KEY
,
JSONObject
.
toJSONString
(
result
));
if
(
ValidationUtil
.
isEmpty
(
isNationwide
))
{
result
=
Systemctl
.
regionClient
.
querySubAgencyTree
(
shaanxiRegionSeq
).
getResult
();
}
else
{
result
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
}
redisUtil
.
set
(
regionTreeRedisKey
,
JSONObject
.
toJSONString
(
result
));
}
}
...
...
@@ -681,7 +689,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
while
(
iterator
.
hasNext
())
{
RegionModel
regionModel
=
iterator
.
next
();
regionModel
.
setLevel
(
regionModel
.
getLevel
().
trim
());
regionModel
.
setLevelName
(
regionModel
.
getLevelName
().
trim
());
regionModel
.
setLevelName
(
ValidationUtil
.
isEmpty
(
regionModel
.
getLevelName
())
?
""
:
regionModel
.
getLevelName
().
trim
());
if
(!
ValidationUtil
.
isEmpty
(
regionModel
.
getChildren
()))
{
despace
(
regionModel
.
getChildren
());
}
...
...
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