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
eb28cd4a
Commit
eb28cd4a
authored
Nov 17, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
5820f517
6fc9dfc9
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
1386 additions
and
460 deletions
+1386
-460
TerminalConstant.java
...join/amos/boot/biz/common/constants/TerminalConstant.java
+12
-0
DataDictionaryController.java
.../boot/biz/common/controller/DataDictionaryController.java
+25
-0
RuleTypeEnum.java
.../com/yeejoin/amos/boot/biz/common/enums/RuleTypeEnum.java
+24
-8
RedisKey.java
...java/com/yeejoin/amos/boot/biz/common/utils/RedisKey.java
+3
-0
RuleUtils.java
...ava/com/yeejoin/amos/boot/biz/common/utils/RuleUtils.java
+2
-1
FireRiskSourceMapper.java
...amos/boot/module/ccs/api/mapper/FireRiskSourceMapper.java
+5
-0
FireRpnChangeLogMapper.java
...os/boot/module/ccs/api/mapper/FireRpnChangeLogMapper.java
+6
-1
IFireRpnChangeLogService.java
...boot/module/ccs/api/service/IFireRpnChangeLogService.java
+3
-0
FireRiskSourceMapper.xml
...cs-api/src/main/resources/mapper/FireRiskSourceMapper.xml
+15
-0
FireRpnChangeLogMapper.xml
...-api/src/main/resources/mapper/FireRpnChangeLogMapper.xml
+27
-0
TzsCommonParam.java
...eejoin/amos/boot/module/tzs/api/enums/TzsCommonParam.java
+7
-0
UnitInfoApproveDto.java
.../amos/boot/module/tzs/flc/api/dto/UnitInfoApproveDto.java
+6
-0
UnitInfoChangeDto.java
...n/amos/boot/module/tzs/flc/api/dto/UnitInfoChangeDto.java
+3
-0
UnitInfoDto.java
...yeejoin/amos/boot/module/tzs/flc/api/dto/UnitInfoDto.java
+43
-4
UnitInfo.java
...yeejoin/amos/boot/module/tzs/flc/api/entity/UnitInfo.java
+33
-8
UnitInfoChange.java
...n/amos/boot/module/tzs/flc/api/entity/UnitInfoChange.java
+27
-8
IUnitInfoService.java
...mos/boot/module/tzs/flc/api/service/IUnitInfoService.java
+11
-0
FireFmeaStatisticsController.java
...dule/ccs/biz/controller/FireFmeaStatisticsController.java
+7
-77
FireRiskSourceController.java
...t/module/ccs/biz/controller/FireRiskSourceController.java
+7
-65
FireRpnChangeLogController.java
...module/ccs/biz/controller/FireRpnChangeLogController.java
+9
-67
FireFmeaStatisticsServiceImpl.java
...e/ccs/biz/service/impl/FireFmeaStatisticsServiceImpl.java
+11
-7
FireRiskSourceServiceImpl.java
...odule/ccs/biz/service/impl/FireRiskSourceServiceImpl.java
+7
-15
FireRpnChangeLogServiceImpl.java
...ule/ccs/biz/service/impl/FireRpnChangeLogServiceImpl.java
+20
-16
FireStationInfoServiceImpl.java
...dule/ccs/biz/service/impl/FireStationInfoServiceImpl.java
+2
-2
RulePlanService.java
...os/supervision/business/service/impl/RulePlanService.java
+14
-13
TzsAuthServiceImpl.java
.../boot/module/tzs/biz/service/impl/TzsAuthServiceImpl.java
+112
-44
VoiceRecordLogServiceImpl.java
...odule/tzs/biz/service/impl/VoiceRecordLogServiceImpl.java
+5
-25
BeanDtoVoUtils.java
...eejoin/amos/boot/module/tzs/biz/utils/BeanDtoVoUtils.java
+37
-0
UnitInfoApproveController.java
...ule/tzs/flc/biz/controller/UnitInfoApproveController.java
+9
-24
UnitInfoController.java
...oot/module/tzs/flc/biz/controller/UnitInfoController.java
+326
-61
UnitInfoServiceImpl.java
.../module/tzs/flc/biz/service/impl/UnitInfoServiceImpl.java
+363
-11
application-dev.properties
...-system-tzs/src/main/resources/application-dev.properties
+4
-2
application-qa.properties
...t-system-tzs/src/main/resources/application-qa.properties
+2
-0
tzs-1.0.0.0.xml
...ystem-tzs/src/main/resources/db/changelog/tzs-1.0.0.0.xml
+198
-0
pom.xml
pom.xml
+1
-1
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/constants/TerminalConstant.java
0 → 100644
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
constants
;
/**
* @Author: xl
* @Description: 终端标识
* @Date: 2021/11/17 11:40
*/
public
class
TerminalConstant
{
public
final
static
String
APP
=
"APP"
;
public
final
static
String
WEB
=
"WEB"
;
public
final
static
String
APP_WEB
=
"APP/WEB"
;
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/controller/DataDictionaryController.java
View file @
eb28cd4a
...
@@ -349,4 +349,29 @@ public class DataDictionaryController extends BaseController {
...
@@ -349,4 +349,29 @@ public class DataDictionaryController extends BaseController {
return
ResponseHelper
.
buildResponse
(
type
);
return
ResponseHelper
.
buildResponse
(
type
);
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/gwmcDataDictionaryNotoken/{type}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据字典类型查询字典不验证token"
,
notes
=
"根据字典类型查询字典不验证token"
)
public
ResponseModel
<
Object
>
gwmcDataDictionaryNotoken
(
@PathVariable
String
type
)
throws
Exception
{
// 数据字典生成树方法 原先通过getCode做主键 现修改为 getSequenceNbr 后期数据字典parent字段保存id 而不要保存code by
// kongfm 2021-09-08
// 数据字典还原 by kongfm 2021-09-09
QueryWrapper
<
DataDictionary
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"type"
,
type
);
queryWrapper
.
orderByAsc
(
"sort_num"
);
if
(
redisUtils
.
hasKey
(
RedisKey
.
DATA_DICTIONARY_CODE
+
type
))
{
Object
obj
=
redisUtils
.
get
(
RedisKey
.
DATA_DICTIONARY_CODE
+
type
);
return
ResponseHelper
.
buildResponse
(
obj
);
}
else
{
Collection
<
DataDictionary
>
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
"getParent"
,
null
);
redisUtils
.
set
(
RedisKey
.
DATA_DICTIONARY_CODE
+
type
,
JSON
.
toJSON
(
menus
),
time
);
return
ResponseHelper
.
buildResponse
(
menus
);
}
}
}
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/enums/RuleTypeEnum.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
enums
;
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
enums
;
import
com.yeejoin.amos.boot.biz.common.constants.TerminalConstant
;
/**
/**
* 规则请求枚举
* 规则请求枚举
* @author xl
* @author xl
*
*
*/
*/
public
enum
RuleTypeEnum
{
public
enum
RuleTypeEnum
{
// 防火监督
// 防火监督
计划提交
(
"计划提交"
,
"addPlan"
,
"auditPage"
),
计划提交
(
"计划提交"
,
"addPlan"
,
"auditPage"
,
TerminalConstant
.
WEB
),
计划审核
(
"计划审核"
,
"planAudit"
,
"auditPage"
),
计划审核
(
"计划审核"
,
"planAudit"
,
"auditPage"
,
TerminalConstant
.
APP_WEB
),
计划审核完成
(
"计划审核完成"
,
"planAuditAll"
,
"formulatePage"
),
计划审核完成
(
"计划审核完成"
,
"planAuditAll"
,
"formulatePage"
,
TerminalConstant
.
APP_WEB
),
计划生成
(
"计划生成"
,
"addPlanTask"
,
null
),
计划生成
(
"计划生成"
,
"addPlanTask"
,
null
,
TerminalConstant
.
APP
),
计划完成
(
"计划完成"
,
"planCompleted"
,
null
),
计划完成
(
"计划完成"
,
"planCompleted"
,
null
,
TerminalConstant
.
APP_WEB
),
// 隐患
// 隐患
隐患第一次提交
(
"隐患提交"
,
"addLatentDanger"
,
null
),
隐患第一次提交
(
"隐患提交"
,
"addLatentDanger"
,
null
,
null
),
隐患审核
(
"隐患审核"
,
"dangerAudit"
,
null
);
隐患审核
(
"隐患审核"
,
"dangerAudit"
,
null
,
null
);
/**
/**
* 名称,描述
* 名称,描述
...
@@ -29,6 +32,10 @@ public enum RuleTypeEnum {
...
@@ -29,6 +32,10 @@ public enum RuleTypeEnum {
* 跳转地址
* 跳转地址
*/
*/
private
String
url
;
private
String
url
;
/**
* 终端标识
*/
private
String
terminal
;
public
String
getName
()
{
public
String
getName
()
{
return
name
;
return
name
;
...
@@ -54,10 +61,19 @@ public enum RuleTypeEnum {
...
@@ -54,10 +61,19 @@ public enum RuleTypeEnum {
this
.
url
=
url
;
this
.
url
=
url
;
}
}
RuleTypeEnum
(
String
name
,
String
code
,
String
url
)
{
public
String
getTerminal
()
{
return
terminal
;
}
public
void
setTerminal
(
String
terminal
)
{
this
.
terminal
=
terminal
;
}
RuleTypeEnum
(
String
name
,
String
code
,
String
url
,
String
terminal
)
{
this
.
name
=
name
;
this
.
name
=
name
;
this
.
code
=
code
;
this
.
code
=
code
;
this
.
url
=
url
;
this
.
url
=
url
;
this
.
terminal
=
terminal
;
}
}
public
static
RuleTypeEnum
getEnumByCode
(
String
field
){
public
static
RuleTypeEnum
getEnumByCode
(
String
field
){
...
...
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/RedisKey.java
View file @
eb28cd4a
...
@@ -39,6 +39,9 @@ public class RedisKey {
...
@@ -39,6 +39,9 @@ public class RedisKey {
/**联通CTIuser token */
/**联通CTIuser token */
public
static
final
String
CTI_USER_TOKEN
=
"cti_user_token"
;
public
static
final
String
CTI_USER_TOKEN
=
"cti_user_token"
;
/** 企业用户注册前缀 */
public
static
final
String
FLC_USER_TEL
=
"flc_tel_"
;
/** 驼峰转下划线(简单写法,效率低于 ) */
/** 驼峰转下划线(简单写法,效率低于 ) */
public
static
String
humpToLine
(
String
str
)
{
public
static
String
humpToLine
(
String
str
)
{
...
...
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/RuleUtils.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
utils
;
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
utils
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -13,7 +14,7 @@ import java.util.Map;
...
@@ -13,7 +14,7 @@ import java.util.Map;
public
class
RuleUtils
{
public
class
RuleUtils
{
public
static
String
instedParams
(
String
content
,
Object
msgObj
)
{
public
static
String
instedParams
(
String
content
,
Object
msgObj
)
{
Map
<
String
,
Object
>
strengthMap
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
msgObj
),
Map
.
class
);
Map
<
String
,
Object
>
strengthMap
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
msgObj
,
SerializerFeature
.
WriteMapNullValue
),
Map
.
class
);
for
(
String
key
:
strengthMap
.
keySet
())
for
(
String
key
:
strengthMap
.
keySet
())
content
=
content
.
replaceAll
(
"\\$\\{"
+
key
+
"}"
,
String
.
valueOf
(
ValidationUtil
.
isEmpty
(
strengthMap
.
get
(
key
))
?
""
:
strengthMap
.
get
(
key
)));
content
=
content
.
replaceAll
(
"\\$\\{"
+
key
+
"}"
,
String
.
valueOf
(
ValidationUtil
.
isEmpty
(
strengthMap
.
get
(
key
))
?
""
:
strengthMap
.
get
(
key
)));
return
content
;
return
content
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-ccs-api/src/main/java/com/yeejoin/amos/boot/module/ccs/api/mapper/FireRiskSourceMapper.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.ccs.api.dto.FireRiskSourceDto
;
import
com.yeejoin.amos.boot.module.ccs.api.entity.FireRiskSource
;
import
com.yeejoin.amos.boot.module.ccs.api.entity.FireRiskSource
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
/**
* 风险点表 Mapper 接口
* 风险点表 Mapper 接口
...
@@ -11,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -11,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
*/
public
interface
FireRiskSourceMapper
extends
BaseMapper
<
FireRiskSource
>
{
public
interface
FireRiskSourceMapper
extends
BaseMapper
<
FireRiskSource
>
{
List
<
FireRiskSourceDto
>
queryForRpnDescList
(
@Param
(
"stationCode"
)
String
stationCode
,
@Param
(
"top"
)
String
top
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-ccs-api/src/main/java/com/yeejoin/amos/boot/module/ccs/api/mapper/FireRpnChangeLogMapper.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.ccs.api.entity.FireRpnChangeLog
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.ccs.api.entity.FireRpnChangeLog
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Date
;
import
java.util.Map
;
/**
/**
* 风险点变化流水 Mapper 接口
* 风险点变化流水 Mapper 接口
...
@@ -11,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -11,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
*/
public
interface
FireRpnChangeLogMapper
extends
BaseMapper
<
FireRpnChangeLog
>
{
public
interface
FireRpnChangeLogMapper
extends
BaseMapper
<
FireRpnChangeLog
>
{
Map
<
String
,
Object
>
queryForRiseUp
(
@Param
(
"stationCode"
)
String
stationCode
,
@Param
(
"type"
)
String
type
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-ccs-api/src/main/java/com/yeejoin/amos/boot/module/ccs/api/service/IFireRpnChangeLogService.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
api
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
api
.
service
;
import
java.util.Map
;
/**
/**
* 风险点变化流水接口类
* 风险点变化流水接口类
*
*
...
@@ -9,4 +11,5 @@ package com.yeejoin.amos.boot.module.ccs.api.service;
...
@@ -9,4 +11,5 @@ package com.yeejoin.amos.boot.module.ccs.api.service;
*/
*/
public
interface
IFireRpnChangeLogService
{
public
interface
IFireRpnChangeLogService
{
Map
<
String
,
Object
>
queryForRiseUp
(
String
stationCode
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-ccs-api/src/main/resources/mapper/FireRiskSourceMapper.xml
View file @
eb28cd4a
...
@@ -2,4 +2,19 @@
...
@@ -2,4 +2,19 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.ccs.api.mapper.FireRiskSourceMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.ccs.api.mapper.FireRiskSourceMapper"
>
<select
id=
"queryForRpnDescList"
resultType=
"com.yeejoin.amos.boot.module.ccs.api.dto.FireRiskSourceDto"
>
SELECT
rs.mrid,
rs.`name`,
rs.parent_mrid,
IFNULL(rs.rpn, 0) rpn,
IFNULL(rs.rpni, 0) rpni
FROM `asf_fire_risk_source` rs
where
rs.parent_mrid > 0
and rs.station_code = #{stationCode}
<if
test=
"top != null and top !=''"
>
limit ${top}
</if>
</select>
</mapper>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-ccs-api/src/main/resources/mapper/FireRpnChangeLogMapper.xml
View file @
eb28cd4a
...
@@ -2,4 +2,31 @@
...
@@ -2,4 +2,31 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.ccs.api.mapper.FireRpnChangeLogMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.ccs.api.mapper.FireRpnChangeLogMapper"
>
<select
id=
"queryForRiseUp"
resultType=
"java.util.Map"
>
select
d.countOfType0,
d.countOfSource,
CONCAT(ROUND(IFNULL(d.countOfType0/d.countOfSource,0)*100,2),'%')type0Rate
from
(SELECT
count(DISTINCT cl.risk_point_mrid) countOfType0,
(select count(1) from asf_fire_risk_source rs where rs.station_code=cl.station_code ) countOfSource
FROM
asf_fire_rpn_change_log cl
WHERE
cl.level_change_type = 0
and cl.station_code = #{stationCode}
<choose>
<when
test=
"type = '1'"
>
and DATE_FORMAT( cl.create_date, '%Y%m' ) = DATE_FORMAT(CURDATE() , '%Y%m')
</when>
<when
test=
"type = '2'"
>
and QUARTER(cl.create_date)=QUARTER(now());
</when>
<when
test=
"type = '3'"
>
and year(cl.create_date)=year(now())
</when>
</choose>
)d
</select>
</mapper>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/enums/TzsCommonParam.java
View file @
eb28cd4a
...
@@ -37,4 +37,11 @@ public class TzsCommonParam {
...
@@ -37,4 +37,11 @@ public class TzsCommonParam {
public
static
final
String
APPJJ
=
"APPJJ"
;
public
static
final
String
APPJJ
=
"APPJJ"
;
public
static
final
String
DD
=
"DD"
;
public
static
final
String
DD
=
"DD"
;
public
static
final
String
JC
=
"JC"
;
public
static
final
String
JC
=
"JC"
;
public
static
final
String
LICENCE_PIC
=
"licencePic"
;
public
static
final
String
ADMIN_LICENSE_PIC
=
"adminLicensePic"
;
public
static
final
String
QR_CODE
=
"qrCode"
;
public
static
final
String
UNIT_TYPE
=
"UNIT_TYPE"
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/dto/UnitInfoApproveDto.java
View file @
eb28cd4a
...
@@ -36,4 +36,10 @@ public class UnitInfoApproveDto extends BaseDto {
...
@@ -36,4 +36,10 @@ public class UnitInfoApproveDto extends BaseDto {
@ApiModelProperty
(
value
=
"0 注册审批 1 变更审批"
)
@ApiModelProperty
(
value
=
"0 注册审批 1 变更审批"
)
private
Integer
approveType
;
private
Integer
approveType
;
@ApiModelProperty
(
value
=
"企业入驻时间"
)
private
Date
approvedTime
;
@ApiModelProperty
(
value
=
"提交时间"
)
private
Date
submitTime
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/dto/UnitInfoChangeDto.java
View file @
eb28cd4a
...
@@ -36,6 +36,9 @@ public class UnitInfoChangeDto extends BaseDto {
...
@@ -36,6 +36,9 @@ public class UnitInfoChangeDto extends BaseDto {
@ApiModelProperty
(
value
=
"单位类型code"
)
@ApiModelProperty
(
value
=
"单位类型code"
)
private
String
unitTypeCode
;
private
String
unitTypeCode
;
@ApiModelProperty
(
value
=
"组织机构编码"
)
private
String
organizationCode
;
@ApiModelProperty
(
value
=
"主管部门"
)
@ApiModelProperty
(
value
=
"主管部门"
)
private
String
comptentDept
;
private
String
comptentDept
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/dto/UnitInfoDto.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* 企业信息表
* 企业信息表
...
@@ -25,10 +28,13 @@ public class UnitInfoDto extends BaseDto {
...
@@ -25,10 +28,13 @@ public class UnitInfoDto extends BaseDto {
private
String
orgName
;
private
String
orgName
;
@ApiModelProperty
(
value
=
"证照类型"
)
@ApiModelProperty
(
value
=
"证照类型"
)
private
String
licen
s
eType
;
private
String
licen
c
eType
;
@ApiModelProperty
(
value
=
"证照类型code"
)
@ApiModelProperty
(
value
=
"证照类型code"
)
private
String
licenseTypeCode
;
private
String
licenceTypeCode
;
@ApiModelProperty
(
value
=
"组织机构编码"
)
private
String
organizationCode
;
@ApiModelProperty
(
value
=
"单位类型"
)
@ApiModelProperty
(
value
=
"单位类型"
)
private
String
unitType
;
private
String
unitType
;
...
@@ -94,10 +100,10 @@ public class UnitInfoDto extends BaseDto {
...
@@ -94,10 +100,10 @@ public class UnitInfoDto extends BaseDto {
private
Date
createTime
;
private
Date
createTime
;
@ApiModelProperty
(
value
=
"单位法人"
)
@ApiModelProperty
(
value
=
"单位法人"
)
private
String
leg
e
lPerson
;
private
String
leg
a
lPerson
;
@ApiModelProperty
(
value
=
"法人电话"
)
@ApiModelProperty
(
value
=
"法人电话"
)
private
String
leg
e
lPersonTel
;
private
String
leg
a
lPersonTel
;
@ApiModelProperty
(
value
=
"单位联系人"
)
@ApiModelProperty
(
value
=
"单位联系人"
)
private
String
contactPerson
;
private
String
contactPerson
;
...
@@ -126,4 +132,37 @@ public class UnitInfoDto extends BaseDto {
...
@@ -126,4 +132,37 @@ public class UnitInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"审批状态 0 审批中 1 审批结束 2 驳回"
)
@ApiModelProperty
(
value
=
"审批状态 0 审批中 1 审批结束 2 驳回"
)
private
Integer
unitStatus
;
private
Integer
unitStatus
;
@ApiModelProperty
(
value
=
"证照图片"
)
private
List
<
AttachmentDto
>
licencePic
;
@ApiModelProperty
(
value
=
"管理员身份证"
)
private
List
<
AttachmentDto
>
adminLicensePic
;
@ApiModelProperty
(
value
=
"是否变更 0 未变更 1 变更中"
)
private
Boolean
isChange
;
@ApiModelProperty
(
value
=
"提交时间开始"
)
private
String
submitTimeStart
;
@ApiModelProperty
(
value
=
"提交时间结束"
)
private
String
submitTimeEnd
;
@ApiModelProperty
(
value
=
"分类名称"
)
private
String
typeStr
;
@ApiModelProperty
(
value
=
"状态名称"
)
private
String
statusStr
;
@ApiModelProperty
(
value
=
"企业二维码"
)
private
List
<
AttachmentDto
>
qrcode
;
@ApiModelProperty
(
value
=
"详细地址全部"
)
private
String
fullAddress
;
@ApiModelProperty
(
value
=
"企业入驻时间"
)
private
Date
approvedTime
;
@ApiModelProperty
(
value
=
"提交时间"
)
private
Date
submitTime
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/entity/UnitInfo.java
View file @
eb28cd4a
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.entity;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
...
@@ -31,14 +32,20 @@ public class UnitInfo extends BaseEntity {
...
@@ -31,14 +32,20 @@ public class UnitInfo extends BaseEntity {
/**
/**
* 证照类型
* 证照类型
*/
*/
@TableField
(
"licen
s
e_type"
)
@TableField
(
"licen
c
e_type"
)
private
String
licen
s
eType
;
private
String
licen
c
eType
;
/**
/**
* 证照类型code
* 证照类型code
*/
*/
@TableField
(
"license_type_code"
)
@TableField
(
"licence_type_code"
)
private
String
licenseTypeCode
;
private
String
licenceTypeCode
;
/**
* 组织机构编码
*/
@TableField
(
"organization_code"
)
private
String
organizationCode
;
/**
/**
* 单位类型
* 单位类型
...
@@ -169,14 +176,14 @@ public class UnitInfo extends BaseEntity {
...
@@ -169,14 +176,14 @@ public class UnitInfo extends BaseEntity {
/**
/**
* 单位法人
* 单位法人
*/
*/
@TableField
(
"leg
e
l_person"
)
@TableField
(
"leg
a
l_person"
)
private
String
leg
e
lPerson
;
private
String
leg
a
lPerson
;
/**
/**
* 法人电话
* 法人电话
*/
*/
@TableField
(
"leg
e
l_person_tel"
)
@TableField
(
"leg
a
l_person_tel"
)
private
String
leg
e
lPersonTel
;
private
String
leg
a
lPersonTel
;
/**
/**
* 单位联系人
* 单位联系人
...
@@ -232,4 +239,22 @@ public class UnitInfo extends BaseEntity {
...
@@ -232,4 +239,22 @@ public class UnitInfo extends BaseEntity {
@TableField
(
"unit_status"
)
@TableField
(
"unit_status"
)
private
Integer
unitStatus
;
private
Integer
unitStatus
;
/**
* 是否变更 0 未变更 1 变更中
*/
@TableField
(
value
=
"is_change"
)
private
Boolean
isChange
;
/**
* 企业入驻时间
*/
@TableField
(
"approved_time"
)
private
Date
approvedTime
;
/**
* 提交时间
*/
@TableField
(
"submit_time"
)
private
Date
submitTime
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/entity/UnitInfoChange.java
View file @
eb28cd4a
...
@@ -31,14 +31,20 @@ public class UnitInfoChange extends BaseEntity {
...
@@ -31,14 +31,20 @@ public class UnitInfoChange extends BaseEntity {
/**
/**
* 证照类型
* 证照类型
*/
*/
@TableField
(
"licen
s
e_type"
)
@TableField
(
"licen
c
e_type"
)
private
String
licen
s
eType
;
private
String
licen
c
eType
;
/**
/**
* 证照类型code
* 证照类型code
*/
*/
@TableField
(
"license_type_code"
)
@TableField
(
"licence_type_code"
)
private
String
licenseTypeCode
;
private
String
licenceTypeCode
;
/**
* 组织机构编码
*/
@TableField
(
"organization_code"
)
private
String
organizationCode
;
/**
/**
* 单位类型
* 单位类型
...
@@ -169,14 +175,14 @@ public class UnitInfoChange extends BaseEntity {
...
@@ -169,14 +175,14 @@ public class UnitInfoChange extends BaseEntity {
/**
/**
* 单位法人
* 单位法人
*/
*/
@TableField
(
"leg
e
l_person"
)
@TableField
(
"leg
a
l_person"
)
private
String
leg
e
lPerson
;
private
String
leg
a
lPerson
;
/**
/**
* 法人电话
* 法人电话
*/
*/
@TableField
(
"leg
e
l_person_tel"
)
@TableField
(
"leg
a
l_person_tel"
)
private
String
leg
e
lPersonTel
;
private
String
leg
a
lPersonTel
;
/**
/**
* 单位联系人
* 单位联系人
...
@@ -208,4 +214,17 @@ public class UnitInfoChange extends BaseEntity {
...
@@ -208,4 +214,17 @@ public class UnitInfoChange extends BaseEntity {
@TableField
(
"unit_status"
)
@TableField
(
"unit_status"
)
private
Integer
unitStatus
;
private
Integer
unitStatus
;
/**
* 企业入驻时间
*/
@TableField
(
"approved_time"
)
private
Date
approvedTime
;
/**
* 提交时间
*/
@TableField
(
"submit_time"
)
private
Date
submitTime
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/service/IUnitInfoService.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
api
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
api
.
service
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoApproveDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto
;
/**
/**
* 企业信息表接口类
* 企业信息表接口类
*
*
...
@@ -9,4 +12,12 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.service;
...
@@ -9,4 +12,12 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.service;
*/
*/
public
interface
IUnitInfoService
{
public
interface
IUnitInfoService
{
/**
* 审批企业注册信息
* @param approveDto
* @return
*/
UnitInfoDto
approve
(
UnitInfoApproveDto
approveDto
);
UnitInfoDto
getDtoById
(
Long
sequenceNbr
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-ccs-biz/src/main/java/com/yeejoin/amos/boot/module/ccs/biz/controller/FireFmeaStatisticsController.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
biz
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.ccs.api.dto.FireFmeaStatisticsDto
;
import
com.yeejoin.amos.boot.module.ccs.api.dto.FireFmeaStatisticsDto
;
import
com.yeejoin.amos.boot.module.ccs.biz.service.impl.FireFmeaStatisticsServiceImpl
;
import
com.yeejoin.amos.boot.module.ccs.biz.service.impl.FireFmeaStatisticsServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
@@ -13,7 +13,6 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...
@@ -13,7 +13,6 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -23,83 +22,13 @@ import java.util.List;
...
@@ -23,83 +22,13 @@ import java.util.List;
* @date 2021-11-09
* @date 2021-11-09
*/
*/
@RestController
@RestController
@Api
(
tags
=
"发生率
/
严重度矩阵统计表Api"
)
@Api
(
tags
=
"发生率
-
严重度矩阵统计表Api"
)
@RequestMapping
(
value
=
"/fire-fmea-statistics"
)
@RequestMapping
(
value
=
"/fire-fmea-statistics"
)
public
class
FireFmeaStatisticsController
extends
BaseController
{
public
class
FireFmeaStatisticsController
extends
BaseController
{
@Autowired
@Autowired
FireFmeaStatisticsServiceImpl
fireFmeaStatisticsServiceImpl
;
FireFmeaStatisticsServiceImpl
fireFmeaStatisticsServiceImpl
;
/**
* 新增发生率/严重度矩阵统计表
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增发生率/严重度矩阵统计表"
,
notes
=
"新增发生率/严重度矩阵统计表"
)
public
ResponseModel
<
FireFmeaStatisticsDto
>
save
(
@RequestBody
FireFmeaStatisticsDto
model
)
{
model
=
fireFmeaStatisticsServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新发生率/严重度矩阵统计表"
,
notes
=
"根据sequenceNbr更新发生率/严重度矩阵统计表"
)
public
ResponseModel
<
FireFmeaStatisticsDto
>
updateBySequenceNbrFireFmeaStatistics
(
@RequestBody
FireFmeaStatisticsDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
String
sequenceNbr
)
{
model
.
setId
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
fireFmeaStatisticsServiceImpl
.
updateWithModel
(
model
));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除发生率/严重度矩阵统计表"
,
notes
=
"根据sequenceNbr删除发生率/严重度矩阵统计表"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
fireFmeaStatisticsServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个发生率/严重度矩阵统计表"
,
notes
=
"根据sequenceNbr查询单个发生率/严重度矩阵统计表"
)
public
ResponseModel
<
FireFmeaStatisticsDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
fireFmeaStatisticsServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"发生率/严重度矩阵统计表分页查询"
,
notes
=
"发生率/严重度矩阵统计表分页查询"
)
public
ResponseModel
<
Page
<
FireFmeaStatisticsDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
FireFmeaStatisticsDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
fireFmeaStatisticsServiceImpl
.
queryForFireFmeaStatisticsPage
(
page
));
}
/**
/**
* 列表全部数据查询
* 列表全部数据查询
...
@@ -107,9 +36,10 @@ public class FireFmeaStatisticsController extends BaseController {
...
@@ -107,9 +36,10 @@ public class FireFmeaStatisticsController extends BaseController {
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"发生率/严重度矩阵统计表列表全部数据查询"
,
notes
=
"发生率/严重度矩阵统计表列表全部数据查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"发生率-严重度矩阵统计"
,
notes
=
"发生率-严重度矩阵统计"
)
@GetMapping
(
value
=
"/list"
)
@GetMapping
(
value
=
"/{stationCode}/list"
)
public
ResponseModel
<
List
<
FireFmeaStatisticsDto
>>
selectForList
()
{
public
ResponseModel
<
List
<
FireFmeaStatisticsDto
>>
selectForList
(
return
ResponseHelper
.
buildResponse
(
fireFmeaStatisticsServiceImpl
.
queryForFireFmeaStatisticsList
());
@ApiParam
(
value
=
"换流站code"
,
required
=
true
)
@PathVariable
String
stationCode
)
{
return
ResponseHelper
.
buildResponse
(
fireFmeaStatisticsServiceImpl
.
queryForFireFmeaStatisticsList
(
stationCode
));
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-ccs-biz/src/main/java/com/yeejoin/amos/boot/module/ccs/biz/controller/FireRiskSourceController.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
biz
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.ccs.api.dto.FireRiskSourceDto
;
import
com.yeejoin.amos.boot.module.ccs.biz.service.impl.FireRiskSourceServiceImpl
;
import
com.yeejoin.amos.boot.module.ccs.biz.service.impl.FireRiskSourceServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
@@ -13,9 +12,6 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...
@@ -13,9 +12,6 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
/**
/**
* 风险点表
* 风险点表
*
*
...
@@ -30,62 +26,6 @@ public class FireRiskSourceController extends BaseController {
...
@@ -30,62 +26,6 @@ public class FireRiskSourceController extends BaseController {
@Autowired
@Autowired
FireRiskSourceServiceImpl
fireRiskSourceServiceImpl
;
FireRiskSourceServiceImpl
fireRiskSourceServiceImpl
;
/**
* 新增风险点表
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增风险点表"
,
notes
=
"新增风险点表"
)
public
ResponseModel
<
FireRiskSourceDto
>
save
(
@RequestBody
FireRiskSourceDto
model
)
{
model
=
fireRiskSourceServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除风险点表"
,
notes
=
"根据sequenceNbr删除风险点表"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
fireRiskSourceServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个风险点表"
,
notes
=
"根据sequenceNbr查询单个风险点表"
)
public
ResponseModel
<
FireRiskSourceDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
fireRiskSourceServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"风险点表分页查询"
,
notes
=
"风险点表分页查询"
)
public
ResponseModel
<
Page
<
FireRiskSourceDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
FireRiskSourceDto
>
page
=
new
Page
<
FireRiskSourceDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
fireRiskSourceServiceImpl
.
queryForFireRiskSourcePage
(
page
));
}
/**
/**
* 列表全部数据查询
* 列表全部数据查询
...
@@ -93,9 +33,11 @@ public class FireRiskSourceController extends BaseController {
...
@@ -93,9 +33,11 @@ public class FireRiskSourceController extends BaseController {
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"风险点表列表全部数据查询"
,
notes
=
"风险点表列表全部数据查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询风险点RPN统计"
,
notes
=
"查询风险点RPN统计"
)
@GetMapping
(
value
=
"/list"
)
@GetMapping
(
value
=
"/{stationCode}/list"
)
public
ResponseModel
<
List
<
FireRiskSourceDto
>>
selectForList
()
{
public
ResponseModel
selectForRpnTopList
(
return
ResponseHelper
.
buildResponse
(
fireRiskSourceServiceImpl
.
queryForFireRiskSourceList
());
@ApiParam
(
value
=
"换流站code"
,
required
=
true
)
@PathVariable
String
stationCode
,
@ApiParam
(
value
=
"top值"
)
@RequestParam
(
required
=
false
)
String
top
)
{
return
ResponseHelper
.
buildResponse
(
fireRiskSourceServiceImpl
.
selectForRpnTopList
(
stationCode
,
top
));
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-ccs-biz/src/main/java/com/yeejoin/amos/boot/module/ccs/biz/controller/FireRpnChangeLogController.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
biz
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.ccs.api.dto.FireRpnChangeLogDto
;
import
com.yeejoin.amos.boot.module.ccs.biz.service.impl.FireRpnChangeLogServiceImpl
;
import
com.yeejoin.amos.boot.module.ccs.biz.service.impl.FireRpnChangeLogServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
/**
/**
* 风险点变化流水
* 风险点变化流水
*
*
...
@@ -30,72 +28,16 @@ public class FireRpnChangeLogController extends BaseController {
...
@@ -30,72 +28,16 @@ public class FireRpnChangeLogController extends BaseController {
@Autowired
@Autowired
FireRpnChangeLogServiceImpl
fireRpnChangeLogServiceImpl
;
FireRpnChangeLogServiceImpl
fireRpnChangeLogServiceImpl
;
/**
* 新增风险点变化流水
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增风险点变化流水"
,
notes
=
"新增风险点变化流水"
)
public
ResponseModel
<
FireRpnChangeLogDto
>
save
(
@RequestBody
FireRpnChangeLogDto
model
)
{
model
=
fireRpnChangeLogServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除风险点变化流水"
,
notes
=
"根据sequenceNbr删除风险点变化流水"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
fireRpnChangeLogServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个风险点变化流水"
,
notes
=
"根据sequenceNbr查询单个风险点变化流水"
)
public
ResponseModel
<
FireRpnChangeLogDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
fireRpnChangeLogServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"风险点变化流水分页查询"
,
notes
=
"风险点变化流水分页查询"
)
public
ResponseModel
<
Page
<
FireRpnChangeLogDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
FireRpnChangeLogDto
>
page
=
new
Page
<
FireRpnChangeLogDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
fireRpnChangeLogServiceImpl
.
queryForFireRpnChangeLogPage
(
page
));
}
/**
/**
*
列表全部数据查询
*
风险点(PRN)上升百分比
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"风险点
变化流水列表全部数据查询"
,
notes
=
"风险点变化流水列表全部数据查询
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"风险点
(PRN)上升百分比"
,
notes
=
"风险点(PRN)上升百分比
"
)
@GetMapping
(
value
=
"/
list
"
)
@GetMapping
(
value
=
"/
{stationCode}/riseUp
"
)
public
ResponseModel
<
List
<
FireRpnChangeLogDto
>>
selectForList
(
)
{
public
ResponseModel
riseUp
(
@PathVariable
String
stationCode
)
{
return
ResponseHelper
.
buildResponse
(
fireRpnChangeLogServiceImpl
.
queryFor
FireRpnChangeLogList
(
));
return
ResponseHelper
.
buildResponse
(
fireRpnChangeLogServiceImpl
.
queryFor
RiseUp
(
stationCode
));
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-ccs-biz/src/main/java/com/yeejoin/amos/boot/module/ccs/biz/service/impl/FireFmeaStatisticsServiceImpl.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.ccs.api.dto.FireFmeaStatisticsDto
;
import
com.yeejoin.amos.boot.module.ccs.api.entity.FireFmeaStatistics
;
import
com.yeejoin.amos.boot.module.ccs.api.entity.FireFmeaStatistics
;
import
com.yeejoin.amos.boot.module.ccs.api.mapper.FireFmeaStatisticsMapper
;
import
com.yeejoin.amos.boot.module.ccs.api.mapper.FireFmeaStatisticsMapper
;
import
com.yeejoin.amos.boot.module.ccs.api.service.IFireFmeaStatisticsService
;
import
com.yeejoin.amos.boot.module.ccs.api.service.IFireFmeaStatisticsService
;
import
com.yeejoin.amos.boot.module.ccs.api.dto.FireFmeaStatisticsDto
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -16,18 +17,20 @@ import java.util.List;
...
@@ -16,18 +17,20 @@ import java.util.List;
* @date 2021-11-09
* @date 2021-11-09
*/
*/
@Service
@Service
public
class
FireFmeaStatisticsServiceImpl
extends
BaseService
<
FireFmeaStatisticsDto
,
FireFmeaStatistics
,
FireFmeaStatisticsMapper
>
implements
IFireFmeaStatisticsService
{
public
class
FireFmeaStatisticsServiceImpl
extends
BaseService
<
FireFmeaStatisticsDto
,
FireFmeaStatistics
,
FireFmeaStatisticsMapper
>
implements
IFireFmeaStatisticsService
{
/**
/**
* 分页查询
* 分页查询
*/
*/
public
Page
<
FireFmeaStatisticsDto
>
queryForFireFmeaStatisticsPage
(
Page
<
FireFmeaStatisticsDto
>
page
)
{
public
Page
<
FireFmeaStatisticsDto
>
queryForFireFmeaStatisticsPage
(
Page
<
FireFmeaStatisticsDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
return
this
.
queryForPage
(
page
,
null
,
false
);
}
}
/**
/**
* 列表查询 示例
* 列表查询 示例
*
* @param stationCode 换流站编号
*/
*/
public
List
<
FireFmeaStatisticsDto
>
queryForFireFmeaStatisticsList
(
)
{
public
List
<
FireFmeaStatisticsDto
>
queryForFireFmeaStatisticsList
(
String
stationCode
)
{
return
this
.
queryFor
List
(
""
,
fals
e
);
return
this
.
queryFor
TopList
(
20
,
"mutiby"
,
false
,
stationCod
e
);
}
}
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-ccs-biz/src/main/java/com/yeejoin/amos/boot/module/ccs/biz/service/impl/FireRiskSourceServiceImpl.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.ccs.api.dto.FireRiskSourceDto
;
import
com.yeejoin.amos.boot.module.ccs.api.entity.FireRiskSource
;
import
com.yeejoin.amos.boot.module.ccs.api.entity.FireRiskSource
;
import
com.yeejoin.amos.boot.module.ccs.api.mapper.FireRiskSourceMapper
;
import
com.yeejoin.amos.boot.module.ccs.api.mapper.FireRiskSourceMapper
;
import
com.yeejoin.amos.boot.module.ccs.api.service.IFireRiskSourceService
;
import
com.yeejoin.amos.boot.module.ccs.api.service.IFireRiskSourceService
;
import
com.yeejoin.amos.boot.module.ccs.api.dto.FireRiskSourceDto
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -16,18 +16,9 @@ import java.util.List;
...
@@ -16,18 +16,9 @@ import java.util.List;
* @date 2021-11-09
* @date 2021-11-09
*/
*/
@Service
@Service
public
class
FireRiskSourceServiceImpl
extends
BaseService
<
FireRiskSourceDto
,
FireRiskSource
,
FireRiskSourceMapper
>
implements
IFireRiskSourceService
{
public
class
FireRiskSourceServiceImpl
extends
BaseService
<
FireRiskSourceDto
,
FireRiskSource
,
FireRiskSourceMapper
>
implements
IFireRiskSourceService
{
/**
* 分页查询
*/
public
Page
<
FireRiskSourceDto
>
queryForFireRiskSourcePage
(
Page
<
FireRiskSourceDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
public
List
<
FireRiskSourceDto
>
selectForRpnTopList
(
String
stationCode
,
String
top
)
{
* 列表查询 示例
return
this
.
baseMapper
.
queryForRpnDescList
(
stationCode
,
top
);
*/
public
List
<
FireRiskSourceDto
>
queryForFireRiskSourceList
()
{
return
this
.
queryForList
(
""
,
false
);
}
}
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-ccs-biz/src/main/java/com/yeejoin/amos/boot/module/ccs/biz/service/impl/FireRpnChangeLogServiceImpl.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ccs
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.ccs.api.dto.FireRpnChangeLogDto
;
import
com.yeejoin.amos.boot.module.ccs.api.entity.FireRpnChangeLog
;
import
com.yeejoin.amos.boot.module.ccs.api.entity.FireRpnChangeLog
;
import
com.yeejoin.amos.boot.module.ccs.api.mapper.FireRpnChangeLogMapper
;
import
com.yeejoin.amos.boot.module.ccs.api.mapper.FireRpnChangeLogMapper
;
import
com.yeejoin.amos.boot.module.ccs.api.service.IFireRpnChangeLogService
;
import
com.yeejoin.amos.boot.module.ccs.api.service.IFireRpnChangeLogService
;
import
com.yeejoin.amos.boot.module.ccs.api.dto.FireRpnChangeLogDto
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
/**
* 风险点变化流水服务实现类
* 风险点变化流水服务实现类
...
@@ -16,18 +17,20 @@ import java.util.List;
...
@@ -16,18 +17,20 @@ import java.util.List;
* @date 2021-11-09
* @date 2021-11-09
*/
*/
@Service
@Service
public
class
FireRpnChangeLogServiceImpl
extends
BaseService
<
FireRpnChangeLogDto
,
FireRpnChangeLog
,
FireRpnChangeLogMapper
>
implements
IFireRpnChangeLogService
{
public
class
FireRpnChangeLogServiceImpl
extends
BaseService
<
FireRpnChangeLogDto
,
FireRpnChangeLog
,
FireRpnChangeLogMapper
>
implements
IFireRpnChangeLogService
{
/**
* 分页查询
*/
public
Page
<
FireRpnChangeLogDto
>
queryForFireRpnChangeLogPage
(
Page
<
FireRpnChangeLogDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
@Override
* 列表查询 示例
public
Map
<
String
,
Object
>
queryForRiseUp
(
String
stationCode
)
{
*/
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
public
List
<
FireRpnChangeLogDto
>
queryForFireRpnChangeLogList
()
{
//本月
return
this
.
queryForList
(
""
,
false
);
Map
resultMonth
=
this
.
baseMapper
.
queryForRiseUp
(
stationCode
,
"1"
);
//本季度
Map
resultSeason
=
this
.
baseMapper
.
queryForRiseUp
(
stationCode
,
"2"
);
//本年
Map
resultYear
=
this
.
baseMapper
.
queryForRiseUp
(
stationCode
,
"3"
);
result
.
put
(
"month"
,
resultMonth
);
result
.
put
(
"season"
,
resultSeason
);
result
.
put
(
"year"
,
resultYear
);
return
result
;
}
}
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-ccs-biz/src/main/java/com/yeejoin/amos/boot/module/ccs/biz/service/impl/FireStationInfoServiceImpl.java
View file @
eb28cd4a
...
@@ -36,8 +36,8 @@ public class FireStationInfoServiceImpl extends BaseService<FireStationInfoDto,
...
@@ -36,8 +36,8 @@ public class FireStationInfoServiceImpl extends BaseService<FireStationInfoDto,
}
}
@Override
@Override
public
FireStationInfoDto
getOneByCode
(
String
stationC
ode
)
{
public
FireStationInfoDto
getOneByCode
(
String
c
ode
)
{
List
<
FireStationInfoDto
>
dtos
=
this
.
queryForList
(
""
,
false
,
stationC
ode
);
List
<
FireStationInfoDto
>
dtos
=
this
.
queryForList
(
""
,
false
,
c
ode
);
if
(
dtos
.
isEmpty
())
{
if
(
dtos
.
isEmpty
())
{
throw
new
RuntimeException
(
"不存在指定数据"
);
throw
new
RuntimeException
(
"不存在指定数据"
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/RulePlanService.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
service
.
impl
;
import
com.yeejoin.amos.boot.biz.common.constants.TerminalConstant
;
import
com.yeejoin.amos.boot.biz.common.enums.RuleTypeEnum
;
import
com.yeejoin.amos.boot.biz.common.enums.RuleTypeEnum
;
import
com.yeejoin.amos.component.rule.RuleTrigger
;
import
com.yeejoin.amos.component.rule.RuleTrigger
;
import
com.yeejoin.amos.supervision.business.dto.PlanRo
;
import
com.yeejoin.amos.supervision.business.dto.PlanRo
;
...
@@ -27,10 +28,6 @@ public class RulePlanService {
...
@@ -27,10 +28,6 @@ public class RulePlanService {
private
final
String
packageId
=
"消息/addPlanRule"
;
private
final
String
packageId
=
"消息/addPlanRule"
;
private
final
String
msgType
=
"supervision"
;
private
final
String
msgType
=
"supervision"
;
private
final
String
APP
=
"APP"
;
private
final
String
WEB
=
"WEB"
;
private
final
String
APP_WEB
=
"APP/WEB"
;
@Autowired
@Autowired
private
RuleTrigger
ruleTrigger
;
private
RuleTrigger
ruleTrigger
;
...
@@ -47,7 +44,6 @@ public class RulePlanService {
...
@@ -47,7 +44,6 @@ public class RulePlanService {
public
Boolean
addPlanAuditRule
(
Plan
plan
,
List
<
String
>
userIds
,
RuleTypeEnum
ruleType
,
String
excuteStateName
)
throws
Exception
{
public
Boolean
addPlanAuditRule
(
Plan
plan
,
List
<
String
>
userIds
,
RuleTypeEnum
ruleType
,
String
excuteStateName
)
throws
Exception
{
PlanRo
planRo
=
buildPlanRo
(
plan
,
userIds
,
ruleType
);
PlanRo
planRo
=
buildPlanRo
(
plan
,
userIds
,
ruleType
);
planRo
.
setExcuteStateName
(
excuteStateName
);
planRo
.
setExcuteStateName
(
excuteStateName
);
//触发规则
//触发规则
ruleTrigger
.
publish
(
planRo
,
packageId
,
new
String
[
0
]);
ruleTrigger
.
publish
(
planRo
,
packageId
,
new
String
[
0
]);
return
true
;
return
true
;
...
@@ -59,11 +55,21 @@ public class RulePlanService {
...
@@ -59,11 +55,21 @@ public class RulePlanService {
planRo
.
setMsgType
(
msgType
);
planRo
.
setMsgType
(
msgType
);
planRo
.
setRuleType
(
ruleType
.
getCode
());
planRo
.
setRuleType
(
ruleType
.
getCode
());
planRo
.
setRelationId
(
String
.
valueOf
(
plan
.
getId
()));
planRo
.
setRelationId
(
String
.
valueOf
(
plan
.
getId
()));
planRo
.
setTerminal
(
ruleType
.
getTerminal
());
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"planId"
,
String
.
valueOf
(
plan
.
getId
()));
if
(!
ValidationUtil
.
isEmpty
(
ruleType
.
getUrl
())){
if
(!
ValidationUtil
.
isEmpty
(
ruleType
.
getUrl
())){
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"url"
,
ruleType
.
getUrl
());
map
.
put
(
"url"
,
ruleType
.
getUrl
());
planRo
.
setExtras
(
map
);
}
if
(
TerminalConstant
.
WEB
.
equals
(
ruleType
.
getTerminal
())){
planRo
.
setIsSendWeb
(
true
);
}
else
if
(
TerminalConstant
.
APP
.
equals
(
ruleType
.
getTerminal
())){
planRo
.
setIsSendApp
(
true
);
}
else
if
(
TerminalConstant
.
APP_WEB
.
equals
(
ruleType
.
getTerminal
())){
planRo
.
setIsSendWeb
(
true
);
planRo
.
setIsSendApp
(
true
);
}
}
if
(
ValidationUtil
.
isEmpty
(
userIds
))
{
if
(
ValidationUtil
.
isEmpty
(
userIds
))
{
...
@@ -72,15 +78,10 @@ public class RulePlanService {
...
@@ -72,15 +78,10 @@ public class RulePlanService {
leadPeopleIds
+=
","
+
plan
.
getUserId
();
leadPeopleIds
+=
","
+
plan
.
getUserId
();
}
}
userIds
=
(
List
<
String
>)
jcsFeignClient
.
getAmosIdListByUserIds
(
leadPeopleIds
).
getResult
();
userIds
=
(
List
<
String
>)
jcsFeignClient
.
getAmosIdListByUserIds
(
leadPeopleIds
).
getResult
();
planRo
.
setIsSendApp
(
true
);
planRo
.
setTerminal
(
WEB
);
}
else
{
planRo
.
setIsSendWeb
(
true
);
planRo
.
setIsSendApp
(
false
);
planRo
.
setTerminal
(
APP_WEB
);
}
}
planRo
.
setSendTime
(
DateUtil
.
date2LongStr
(
new
Date
()));
planRo
.
setSendTime
(
DateUtil
.
date2LongStr
(
new
Date
()));
planRo
.
setRecivers
(
userIds
);
planRo
.
setRecivers
(
userIds
);
planRo
.
setExtras
(
map
);
return
planRo
;
return
planRo
;
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/TzsAuthServiceImpl.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONArray
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.bo.DepartmentBo
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.bo.RoleBo
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.common.api.service.ISourceFileService
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledObjsDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledRecordDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertHandlerDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertHandlerInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertPaperInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DutySeatDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBusinessListDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBussinessDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.DispatchPaper
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.DispatchTask
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.VoiceRecordFile
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.TzsCommonParam
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.AlertCalledMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IAlertCalledService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.TzsAuthService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.TzsAuthService
;
import
com.yeejoin.amos.
boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
com.yeejoin.amos.
component.feign.config.TokenOperation
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
com.yeejoin.amos.feign.privilege.model.IdPasswordAuthModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.privilege.util.DesUtil
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
/**
* 特种设备权限服务实现类
* 特种设备权限服务实现类
...
@@ -70,6 +39,22 @@ import java.util.stream.Collectors;
...
@@ -70,6 +39,22 @@ import java.util.stream.Collectors;
@Service
@Service
public
class
TzsAuthServiceImpl
implements
TzsAuthService
{
public
class
TzsAuthServiceImpl
implements
TzsAuthService
{
@Autowired
RedisUtils
redisUtils
;
@Value
(
"${cti.user.name}"
)
private
String
ctiUserName
;
@Value
(
"${cti.user.pwd}"
)
private
String
ctiUserPwd
;
/**
* saveUserRedis设置过期时间
*/
@Value
(
"${redis.cache.failure.time}"
)
private
Long
redisRegionTimeSecond
;
@Override
@Override
public
List
<
String
>
getUserRegionCode
()
{
public
List
<
String
>
getUserRegionCode
()
{
...
@@ -154,4 +139,86 @@ public class TzsAuthServiceImpl implements TzsAuthService {
...
@@ -154,4 +139,86 @@ public class TzsAuthServiceImpl implements TzsAuthService {
}
}
}
}
private
void
loginCtiUser
()
{
String
passwd
=
DesUtil
.
encode
(
ctiUserPwd
,
"qaz"
);
IdPasswordAuthModel
loninData
=
new
IdPasswordAuthModel
();
loninData
.
setLoginId
(
ctiUserName
);
loninData
.
setPassword
(
passwd
);
FeignClientResult
loginResult
=
Privilege
.
authClient
.
idpassword
(
loninData
);
if
(
loginResult
.
getStatus
()
==
200
)
{
HashMap
resultMap
=
(
HashMap
)
loginResult
.
getResult
();
redisUtils
.
set
(
RedisKey
.
CTI_USER_TOKEN
,
resultMap
.
get
(
"token"
).
toString
(),
redisRegionTimeSecond
);
}
}
public
void
setRequestContext
()
{
// 需要登录后台账号
RequestContext
.
setAppKey
(
"AMOS_STUDIO"
);
RequestContext
.
setProduct
(
"AMOS_STUDIO_WEB"
);
if
(
redisUtils
.
hasKey
(
RedisKey
.
CTI_USER_TOKEN
))
{
// 验证token
boolean
validToken
=
TokenOperation
.
refresh
(
redisUtils
.
get
(
RedisKey
.
CTI_USER_TOKEN
).
toString
());
if
(!
validToken
)
{
// 登陆
this
.
loginCtiUser
();
}
}
else
{
// 登陆
this
.
loginCtiUser
();
}
String
ctiToken
=
redisUtils
.
get
(
RedisKey
.
CTI_USER_TOKEN
).
toString
();
RequestContext
.
setToken
(
ctiToken
);
try
{
FeignClientResult
<
AgencyUserModel
>
agencyUserModel
=
Privilege
.
agencyUserClient
.
queryByUserName
(
ctiUserName
);
AgencyUserModel
userModel
=
agencyUserModel
.
getResult
();
RequestContext
.
setExeUserId
(
userModel
.
getUserId
());
if
(
userModel
==
null
)
{
throw
new
Exception
(
"无法获取用户信息"
);
}
saveUserRedis
(
userModel
,
ctiToken
);
}
catch
(
Exception
e
)
{
//删除失效token缓存
throw
new
RuntimeException
(
e
.
getMessage
());
}
}
private
void
saveUserRedis
(
AgencyUserModel
user
,
String
token
)
{
String
authToken
=
RedisKey
.
buildReginKey
(
user
.
getUserId
(),
token
);
if
(
redisUtils
.
hasKey
(
authToken
))
{
return
;
}
CompanyBo
company
=
new
CompanyBo
();
DepartmentBo
department
=
new
DepartmentBo
();
RoleBo
role
=
new
RoleBo
();
CompanyModel
companyM
=
user
.
getCompanys
()
!=
null
?
user
.
getCompanys
().
get
(
0
)
:
null
;
Bean
.
copyExistPropertis
(
companyM
,
company
);
Map
<
Long
,
List
<
DepartmentModel
>>
mapDepartments
=
user
.
getCompanyDepartments
();
DepartmentModel
departmentM
=
companyM
!=
null
?
mapDepartments
.
get
(
companyM
.
getSequenceNbr
()).
get
(
0
)
:
null
;
Bean
.
copyExistPropertis
(
departmentM
,
department
);
Map
<
Long
,
List
<
RoleModel
>>
roles
=
user
.
getOrgRoles
();
Long
sequenceNbr
;
if
(
departmentM
==
null
)
{
sequenceNbr
=
null
;
}
else
{
sequenceNbr
=
departmentM
.
getSequenceNbr
();
}
RoleModel
roleM
=
null
;
if
(
sequenceNbr
==
null
)
{
roleM
=
companyM
!=
null
?
roles
.
get
(
companyM
.
getSequenceNbr
()).
get
(
0
)
:
null
;
}
else
{
roleM
=
roles
.
get
(
sequenceNbr
).
get
(
0
);
}
Bean
.
copyExistPropertis
(
roleM
,
role
);
ReginParams
reginParams
=
new
ReginParams
();
reginParams
.
setCompany
(
company
);
reginParams
.
setRole
(
role
);
reginParams
.
setDepartment
(
department
);
reginParams
.
setUserModel
(
user
);
redisUtils
.
set
(
authToken
,
JSONObject
.
toJSONString
(
reginParams
),
redisRegionTimeSecond
);
}
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/VoiceRecordLogServiceImpl.java
View file @
eb28cd4a
...
@@ -73,22 +73,13 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
...
@@ -73,22 +73,13 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
@Autowired
@Autowired
private
VoiceRecordFileServiceImpl
voiceRecordFileServiceImpl
;
private
VoiceRecordFileServiceImpl
voiceRecordFileServiceImpl
;
@Autowired
private
TzsAuthServiceImpl
tzsAuthServiceImpl
;
@Scheduled
(
fixedDelay
=
ONE_Minute
)
@Scheduled
(
fixedDelay
=
ONE_Minute
)
public
void
fixedDelayJob
(){
public
void
fixedDelayJob
(){
// 需要登录后台账号
// 设置token
RequestContext
.
setAppKey
(
"AMOS_STUDIO"
);
tzsAuthServiceImpl
.
setRequestContext
();
RequestContext
.
setProduct
(
"AMOS_STUDIO_WEB"
);
if
(
redisUtils
.
hasKey
(
RedisKey
.
CTI_USER_TOKEN
))
{
// 验证token
boolean
validToken
=
TokenOperation
.
refresh
(
redisUtils
.
get
(
RedisKey
.
CTI_USER_TOKEN
).
toString
());
if
(!
validToken
)
{
// 登陆
loginCtiUser
();
}
}
else
{
// 登陆
loginCtiUser
();
}
String
ctiToken
=
redisUtils
.
get
(
RedisKey
.
CTI_USER_TOKEN
).
toString
();
RequestContext
.
setToken
(
ctiToken
);
// 首先查找未完成 且失败次数少于5 的 记录
// 首先查找未完成 且失败次数少于5 的 记录
List
<
VoiceRecordLog
>
logList
=
this
.
list
(
new
LambdaQueryWrapper
<
VoiceRecordLog
>().
eq
(
VoiceRecordLog:
:
getIsDeal
,
false
).
lt
(
VoiceRecordLog:
:
getDealTimes
,
5
));
List
<
VoiceRecordLog
>
logList
=
this
.
list
(
new
LambdaQueryWrapper
<
VoiceRecordLog
>().
eq
(
VoiceRecordLog:
:
getIsDeal
,
false
).
lt
(
VoiceRecordLog:
:
getDealTimes
,
5
));
if
(
logList
!=
null
&&
logList
.
size
()
>
0
)
{
if
(
logList
!=
null
&&
logList
.
size
()
>
0
)
{
...
@@ -176,17 +167,6 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
...
@@ -176,17 +167,6 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
}
}
private
void
loginCtiUser
()
{
String
passwd
=
DesUtil
.
encode
(
ctiUserPwd
,
"qaz"
);
IdPasswordAuthModel
loninData
=
new
IdPasswordAuthModel
();
loninData
.
setLoginId
(
ctiUserName
);
loninData
.
setPassword
(
passwd
);
FeignClientResult
loginResult
=
Privilege
.
authClient
.
idpassword
(
loninData
);
if
(
loginResult
.
getStatus
()
==
200
)
{
HashMap
resultMap
=
(
HashMap
)
loginResult
.
getResult
();
redisUtils
.
set
(
RedisKey
.
CTI_USER_TOKEN
,
resultMap
.
get
(
"token"
).
toString
(),
25920000
l
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/utils/BeanDtoVoUtils.java
View file @
eb28cd4a
...
@@ -6,6 +6,8 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorDto;
...
@@ -6,6 +6,8 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorDto;
import
com.yeejoin.amos.boot.module.tzs.api.dto.MaintenanceUnitDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.MaintenanceUnitDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.MaintenanceUnit
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.MaintenanceUnit
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -237,4 +239,38 @@ public class BeanDtoVoUtils {
...
@@ -237,4 +239,38 @@ public class BeanDtoVoUtils {
}
}
});
});
}
}
/**
* 将企业注册实体类转换为Vo
*
* @param page 原分页对象
* @return 转换后的分页对象
*/
public
static
IPage
<
UnitInfoDto
>
unitInfoIPageDto
(
IPage
<
UnitInfo
>
page
)
{
return
page
.
convert
(
item
->
{
try
{
UnitInfoDto
target
=
new
UnitInfoDto
();
// 把原对象数据拷贝到新对象
BeanUtils
.
copyProperties
(
item
,
target
);
if
(
item
.
getIsChange
())
{
target
.
setTypeStr
(
"变更"
);
}
else
{
target
.
setTypeStr
(
"注册"
);
}
if
(
0
==
item
.
getUnitStatus
())
{
target
.
setStatusStr
(
"审批中"
);
}
else
if
(
1
==
item
.
getUnitStatus
())
{
target
.
setStatusStr
(
"审批结束"
);
}
else
if
(
2
==
item
.
getUnitStatus
())
{
target
.
setStatusStr
(
"已驳回"
);
}
target
.
setFullAddress
(
item
.
getProvince
()
+
item
.
getCity
()
+
item
.
getDistrict
()
+
item
.
getStree
()
+
item
.
getCommunity
()
+
item
.
getAddress
());
return
target
;
}
catch
(
Exception
e
)
{
return
null
;
}
});
}
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/UnitInfoApproveController.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.AlertBeanDtoVoUtils
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoApproveDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoApproveDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.UnitInfoApproveServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.UnitInfoApproveServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -66,19 +73,6 @@ public class UnitInfoApproveController extends BaseController {
...
@@ -66,19 +73,6 @@ public class UnitInfoApproveController extends BaseController {
}
}
/**
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除企业信息审批意见表"
,
notes
=
"根据sequenceNbr删除企业信息审批意见表"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
unitInfoApproveServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询
*
*
* @param sequenceNbr 主键
* @param sequenceNbr 主键
...
@@ -109,15 +103,6 @@ public class UnitInfoApproveController extends BaseController {
...
@@ -109,15 +103,6 @@ public class UnitInfoApproveController extends BaseController {
return
ResponseHelper
.
buildResponse
(
unitInfoApproveServiceImpl
.
queryForFlcUnitInfoApprovePage
(
page
));
return
ResponseHelper
.
buildResponse
(
unitInfoApproveServiceImpl
.
queryForFlcUnitInfoApprovePage
(
page
));
}
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"企业信息审批意见表列表全部数据查询"
,
notes
=
"企业信息审批意见表列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
UnitInfoApproveDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
unitInfoApproveServiceImpl
.
queryForFlcUnitInfoApproveList
());
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/UnitInfoController.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzsAuthServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoApproveDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo
;
import
io.swagger.annotations.ApiOperation
;
import
com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.UnitInfoServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.List
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.UnitInfoServiceImpl
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java
x.servlet.http.HttpServletRequest
;
import
java
.util.Collection
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.HashMap
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.Iterator
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
java.util.Map
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
java.util.Random
;
/**
/**
* 企业信息表
* 企业信息表
...
@@ -28,49 +57,186 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
...
@@ -28,49 +57,186 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
@RequestMapping
(
value
=
"/flc-unit-info"
)
@RequestMapping
(
value
=
"/flc-unit-info"
)
public
class
UnitInfoController
extends
BaseController
{
public
class
UnitInfoController
extends
BaseController
{
@Autowired
RedisUtils
redisUtils
;
/**
* token 过期时间,wechat 系统为7200 ,tzs 系统小于7200 防止获取到无效token
*/
private
long
time
=
600
l
;
@Autowired
@Autowired
UnitInfoServiceImpl
unitInfoServiceImpl
;
UnitInfoServiceImpl
unitInfoServiceImpl
;
@Value
(
"${flc.sms.tempCode}"
)
private
String
smsTempCode
;
@Autowired
private
TzsAuthServiceImpl
tzsAuthServiceImpl
;
/**
* 获取组织机构树
*
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/region/tree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取组织机构树"
,
notes
=
"获取组织机构树"
)
public
ResponseModel
<
Collection
<
RegionModel
>>
getRegionTree
(
@RequestParam
(
value
=
"parentId"
,
required
=
false
)
Long
parentId
)
{
tzsAuthServiceImpl
.
setRequestContext
();
Collection
<
RegionModel
>
result
=
null
;
if
(
parentId
==
null
)
{
result
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
}
else
{
result
=
Systemctl
.
regionClient
.
querySubAgencyTree
(
parentId
).
getResult
();
}
return
ResponseHelper
.
buildResponse
(
result
);
}
/**
* 获取管辖单位树
*
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/managerment/tree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取管辖单位树"
,
notes
=
"获取管辖单位树"
)
public
ResponseModel
<
Collection
<
CompanyModel
>>
getManagermentTree
()
{
Collection
<
CompanyModel
>
result
=
null
;
result
=
Privilege
.
companyClient
.
companyTreeWithoutAuth
().
getResult
();
return
ResponseHelper
.
buildResponse
(
result
);
}
/**
* 企业信息图片上传 无token
*
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/uploadFile"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"企业信息图片上传 无token"
,
notes
=
"企业信息图片上传 无token"
)
public
ResponseModel
<
String
>
uploadFile
(
@ApiParam
(
value
=
"文件"
,
required
=
true
)
@RequestParam
MultipartFile
file
)
{
if
(
ValidationUtil
.
isEmpty
(
file
)){
throw
new
BadRequest
(
"参数校验失败."
);
}
tzsAuthServiceImpl
.
setRequestContext
();
FeignClientResult
<
Map
<
String
,
String
>>
date
=
Systemctl
.
fileStorageClient
.
updateCommonFile
(
file
);
String
urlString
=
""
;
if
(
date
!=
null
)
{
Map
<
String
,
String
>
map
=
date
.
getResult
();
Iterator
<
String
>
it
=
map
.
keySet
().
iterator
();
while
(
it
.
hasNext
())
{
urlString
=
it
.
next
();
}
}
return
ResponseHelper
.
buildResponse
(
urlString
);
}
/**
* 判断组织机构是否存在
*
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/hasExistUnit/{organizationCode}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"判断组织机构是否存在"
,
notes
=
"判断组织机构是否存在"
)
public
ResponseModel
<
Boolean
>
hasExistUnit
(
@PathVariable
(
value
=
"organizationCode"
)
String
organizationCode
)
{
Boolean
flag
=
false
;
UnitInfo
temp
=
unitInfoServiceImpl
.
getOne
(
new
LambdaQueryWrapper
<
UnitInfo
>().
eq
(
UnitInfo:
:
getIsDelete
,
false
).
eq
(
UnitInfo:
:
getOrganizationCode
,
organizationCode
));
if
(
temp
!=
null
)
{
flag
=
true
;
}
return
ResponseHelper
.
buildResponse
(
flag
);
}
/**
* 判断用户是否存在
*
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/hasExistUser/{userName}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"判断用户是否存在"
,
notes
=
"判断用户是否存在"
)
public
ResponseModel
<
Boolean
>
hasExistUser
(
@PathVariable
(
value
=
"userName"
)
String
userName
)
{
Boolean
flag
=
false
;
AgencyUserModel
user
=
Privilege
.
agencyUserClient
.
queryByUserName
(
userName
).
getResult
();
if
(
user
!=
null
)
{
flag
=
true
;
}
return
ResponseHelper
.
buildResponse
(
flag
);
}
/**
* 发送手机号验证码
*
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/sendTelCode/{tel}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"发送手机号验证码"
,
notes
=
"发送手机号验证码"
)
public
ResponseModel
<
Boolean
>
sendTelCode
(
@PathVariable
(
value
=
"tel"
)
String
tel
)
{
if
(
ValidationUtil
.
isEmpty
(
tel
))
{
throw
new
BadRequest
(
"参数校验失败."
);
}
Boolean
flag
=
false
;
HashMap
<
String
,
String
>
params
=
new
HashMap
<>();
String
code
=
this
.
getRandomCode
();
params
.
put
(
"code"
,
code
);
params
.
put
(
"mobile"
,
tel
);
params
.
put
(
"smsCode"
,
smsTempCode
);
try
{
Systemctl
.
smsClient
.
sendCommonSms
(
params
).
getResult
();
flag
=
true
;
}
catch
(
Exception
e
)
{
throw
new
BadRequest
(
"发送短信失败:"
+
e
.
getMessage
());
}
// code 保存到缓存中
redisUtils
.
set
(
RedisKey
.
FLC_USER_TEL
+
tel
,
code
,
time
);
return
ResponseHelper
.
buildResponse
(
flag
);
}
/**
* 验证手机号验证码是否成功
*
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/verifyTelCode/{tel}/{code}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"验证手机号验证码是否成功"
,
notes
=
"验证手机号验证码是否成功"
)
public
ResponseModel
<
Boolean
>
verifyTelCode
(
@PathVariable
(
value
=
"tel"
)
String
tel
,
@PathVariable
(
value
=
"code"
)
String
code
)
{
Boolean
flag
=
false
;
if
(
ValidationUtil
.
isEmpty
(
tel
)
||
ValidationUtil
.
isEmpty
(
code
))
{
throw
new
BadRequest
(
"参数校验失败."
);
}
if
(
redisUtils
.
hasKey
(
RedisKey
.
FLC_USER_TEL
+
tel
))
{
String
redisCode
=
redisUtils
.
get
(
RedisKey
.
FLC_USER_TEL
+
tel
).
toString
();
if
(
code
.
equals
(
redisCode
))
{
flag
=
true
;
}
}
return
ResponseHelper
.
buildResponse
(
flag
);
}
/**
/**
* 新增企业信息表
* 新增企业信息表
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增企业信息表"
,
notes
=
"新增企业信息表"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增企业信息表"
,
notes
=
"新增企业信息表"
)
public
ResponseModel
<
UnitInfoDto
>
save
(
@RequestBody
UnitInfoDto
model
)
{
public
ResponseModel
<
UnitInfoDto
>
save
(
@RequestBody
UnitInfoDto
model
)
{
model
=
unitInfoServiceImpl
.
createWithModel
(
model
);
model
=
unitInfoServiceImpl
.
saveUnitInfo
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新企业信息表"
,
notes
=
"根据sequenceNbr更新企业信息表"
)
public
ResponseModel
<
UnitInfoDto
>
updateBySequenceNbrFlcUnitInfo
(
@RequestBody
UnitInfoDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
updateWithModel
(
model
));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除企业信息表"
,
notes
=
"根据sequenceNbr删除企业信息表"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询
*
*
...
@@ -81,36 +247,135 @@ public class UnitInfoController extends BaseController {
...
@@ -81,36 +247,135 @@ public class UnitInfoController extends BaseController {
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个企业信息表"
,
notes
=
"根据sequenceNbr查询单个企业信息表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个企业信息表"
,
notes
=
"根据sequenceNbr查询单个企业信息表"
)
public
ResponseModel
<
UnitInfoDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
public
ResponseModel
<
UnitInfoDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
queryBySeq
(
sequenceNbr
));
if
(
ValidationUtil
.
isEmpty
(
sequenceNbr
)
)
{
throw
new
BadRequest
(
"参数校验失败."
);
}
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
getDtoById
(
sequenceNbr
));
}
}
/**
/**
* 列表分页查询
* 列表分页查询
*
*
* @param current
当前页
* @param pageNum
当前页
* @param current
每页大小
* @param pageSize
每页大小
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@GetMapping
(
value
=
"/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"企业信息表分页查询"
,
notes
=
"企业信息表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"企业审核列表查询"
,
notes
=
"企业审核列表查询"
)
public
ResponseModel
<
Page
<
UnitInfoDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
public
ResponseModel
<
IPage
<
UnitInfoDto
>>
queryForPage
(
String
pageNum
,
String
pageSize
,
String
sort
,
UnitInfoDto
unitInfoDto
)
{
(
value
=
"size"
)
int
size
)
{
// UnitInfo unitInfo = BeanDtoVoUtils.convert(unitInfoDto, UnitInfo.class);
Page
<
UnitInfoDto
>
page
=
new
Page
<
UnitInfoDto
>();
Page
<
UnitInfo
>
pageBean
;
page
.
setCurrent
(
current
);
IPage
<
UnitInfo
>
page
;
page
.
setSize
(
size
);
QueryWrapper
<
UnitInfo
>
unitInfoQueryWrapper
=
new
QueryWrapper
<
UnitInfo
>();
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
queryForFlcUnitInfoPage
(
page
));
setQueryWrapper
(
unitInfoQueryWrapper
,
unitInfoDto
,
sort
);
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
}
else
{
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
}
page
=
unitInfoServiceImpl
.
page
(
pageBean
,
unitInfoQueryWrapper
);
int
num
=
unitInfoServiceImpl
.
count
(
unitInfoQueryWrapper
);
pageBean
.
setTotal
(
num
);
IPage
<
UnitInfoDto
>
unitInfoVoIPage
=
BeanDtoVoUtils
.
unitInfoIPageDto
(
page
);
return
ResponseHelper
.
buildResponse
(
unitInfoVoIPage
);
}
private
QueryWrapper
<
UnitInfo
>
setQueryWrapper
(
QueryWrapper
<
UnitInfo
>
queryWrapper
,
UnitInfoDto
unitInfoDto
,
String
sort
)
{
queryWrapper
.
eq
(
"is_delete"
,
false
);
if
(
sort
!=
null
)
{
// 排序失效
String
[]
date
=
sort
.
split
(
","
);
if
(
date
[
1
].
equals
(
"ascend"
))
{
queryWrapper
.
orderByAsc
(
RedisKey
.
humpToLine
(
date
[
0
]));
}
else
{
queryWrapper
.
orderByDesc
(
RedisKey
.
humpToLine
(
date
[
0
]));
}
}
else
{
queryWrapper
.
orderByDesc
(
"submit_time"
);
}
if
(!
ValidationUtil
.
isEmpty
(
unitInfoDto
.
getIsChange
()))
{
// 分类 注册 / 信息变更 0 注册 1 变更
queryWrapper
.
eq
(
"is_change"
,
unitInfoDto
.
getIsChange
());
}
if
(!
ValidationUtil
.
isEmpty
(
unitInfoDto
.
getSubmitTimeStart
()))
{
// 提交时间
queryWrapper
.
ge
(
"submit_time"
,
unitInfoDto
.
getSubmitTimeStart
());
}
if
(!
ValidationUtil
.
isEmpty
(
unitInfoDto
.
getSubmitTimeEnd
()))
{
// 提交时间
queryWrapper
.
le
(
"submit_time"
,
unitInfoDto
.
getSubmitTimeEnd
());
}
if
(!
ValidationUtil
.
isEmpty
(
unitInfoDto
.
getUnitTypeCode
()))
{
// 单位类型
queryWrapper
.
like
(
"unit_type_code"
,
unitInfoDto
.
getUnitTypeCode
());
}
if
(!
ValidationUtil
.
isEmpty
(
unitInfoDto
.
getOrgName
()))
{
// 单位名称
queryWrapper
.
like
(
"org_name"
,
unitInfoDto
.
getOrgName
());
}
if
(!
ValidationUtil
.
isEmpty
(
unitInfoDto
.
getOrganizationCode
()))
{
// 组织机构代码/统一信用代码
queryWrapper
.
like
(
"organization_code"
,
unitInfoDto
.
getOrganizationCode
());
}
if
(!
ValidationUtil
.
isEmpty
(
unitInfoDto
.
getAdminName
()))
{
// 管理员
queryWrapper
.
like
(
"admin_name"
,
unitInfoDto
.
getAdminName
());
}
if
(!
ValidationUtil
.
isEmpty
(
unitInfoDto
.
getAdminTel
()))
{
// 管理员电话
queryWrapper
.
like
(
"admin_tel"
,
unitInfoDto
.
getAdminTel
());
}
if
(!
ValidationUtil
.
isEmpty
(
unitInfoDto
.
getUnitStatus
()))
{
// 审核状态
queryWrapper
.
like
(
"unit_status"
,
unitInfoDto
.
getUnitStatus
());
}
if
(!
ValidationUtil
.
isEmpty
(
unitInfoDto
.
getLegalPerson
()))
{
// 法人
queryWrapper
.
like
(
"legal_person"
,
unitInfoDto
.
getLegalPerson
());
}
if
(!
ValidationUtil
.
isEmpty
(
unitInfoDto
.
getLegalPersonTel
()))
{
// 法人电话
queryWrapper
.
like
(
"legal_person_tel"
,
unitInfoDto
.
getLegalPersonTel
());
}
return
queryWrapper
;
}
}
private
String
getRandomCode
(){
String
code
=
""
;
Random
random
=
new
Random
();
for
(
int
i
=
0
;
i
<
6
;
i
++)
{
int
r
=
random
.
nextInt
(
10
);
//每次随机出一个数字(0-9)
code
=
code
+
r
;
//把每次随机出的数字拼在一起
}
return
code
;
}
/**
/**
*
列表全部数据查询
*
审批企业注册
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"企业信息表列表全部数据查询"
,
notes
=
"企业信息表列表全部数据查询"
)
@PostMapping
(
value
=
"/approve"
)
@GetMapping
(
value
=
"/list"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"审批企业注册"
,
notes
=
"审批企业注册"
)
public
ResponseModel
<
List
<
UnitInfoDto
>>
selectForList
()
{
public
ResponseModel
<
UnitInfoDto
>
approve
(
@RequestBody
UnitInfoApproveDto
approveDto
)
{
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
queryForFlcUnitInfoList
());
if
(
ValidationUtil
.
isEmpty
(
approveDto
.
getUnitId
())
||
ValidationUtil
.
isEmpty
(
approveDto
.
getApproveStatus
()))
{
throw
new
BadRequest
(
"参数校验失败."
);
}
UnitInfoDto
model
=
unitInfoServiceImpl
.
approve
(
approveDto
);
return
ResponseHelper
.
buildResponse
(
model
);
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/UnitInfoServiceImpl.java
View file @
eb28cd4a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.service.ISourceFileService
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.TzsCommonParam
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzsAuthServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoApproveDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfoChange
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.mapper.UnitInfoMapper
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.mapper.UnitInfoMapper
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.service.IUnitInfoService
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.service.IUnitInfoService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.privilege.util.DesUtil
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.mock.web.MockMultipartFile
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
/**
/**
* 企业信息表服务实现类
* 企业信息表服务实现类
...
@@ -18,17 +55,331 @@ import java.util.List;
...
@@ -18,17 +55,331 @@ import java.util.List;
*/
*/
@Service
@Service
public
class
UnitInfoServiceImpl
extends
BaseService
<
UnitInfoDto
,
UnitInfo
,
UnitInfoMapper
>
implements
IUnitInfoService
{
public
class
UnitInfoServiceImpl
extends
BaseService
<
UnitInfoDto
,
UnitInfo
,
UnitInfoMapper
>
implements
IUnitInfoService
{
/**
* 分页查询
private
final
Logger
logger
=
LogManager
.
getLogger
(
UnitInfoServiceImpl
.
class
);
*/
public
Page
<
UnitInfoDto
>
queryForFlcUnitInfoPage
(
Page
<
UnitInfoDto
>
page
)
{
@Autowired
return
this
.
queryForPage
(
page
,
null
,
false
);
private
TzsAuthServiceImpl
tzsAuthServiceImpl
;
@Autowired
ISourceFileService
ISourceFileService
;
@Autowired
DataDictionaryServiceImpl
iDataDictionaryService
;
@Autowired
UnitInfoChangeServiceImpl
iUnitInfoChangeServiceImpl
;
@Autowired
UnitInfoApproveServiceImpl
iUnitInfoApproveServiceImpl
;
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
@Autowired
UnitInfoChangeServiceImpl
unitInfoChangeServiceImpl
;
@Autowired
SourceFileServiceImpl
sourceFileService
;
@Transactional
public
UnitInfoDto
saveUnitInfo
(
UnitInfoDto
model
)
{
tzsAuthServiceImpl
.
setRequestContext
();
model
.
setUnitStatus
(
0
);
// 设置为待审核状态
model
.
setSubmitTime
(
new
Date
());
// 提交时间
model
.
setIsChange
(
false
);
// 新增状态不是变更状态
// 处理单位类型
String
unitTypeCode
=
model
.
getUnitTypeCode
();
String
[]
unitTypeCodes
=
unitTypeCode
.
split
(
","
);
String
unitType
=
""
;
for
(
String
t
:
unitTypeCodes
)
{
LambdaQueryWrapper
<
DataDictionary
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
DataDictionary:
:
getType
,
TzsCommonParam
.
UNIT_TYPE
).
eq
(
DataDictionary:
:
getCode
,
t
);
DataDictionary
temp
=
iDataDictionaryService
.
getOne
(
queryWrapper
);
unitType
+=
","
+
temp
.
getName
();
}
if
(
unitType
.
length
()
>
0
)
{
unitType
=
unitType
.
substring
(
1
);
model
.
setUnitType
(
unitType
);
}
// 处理密码信息
String
oldPwd
=
model
.
getAdminLoginPwd
();
String
newPwd
=
DesUtil
.
encode
(
oldPwd
,
"qaz"
);
model
.
setAdminLoginPwd
(
newPwd
);
UnitInfo
entity
=
this
.
prepareEntity
(
model
);
if
(
this
.
save
(
entity
))
{
// 处理图片信息
Map
<
String
,
List
<
AttachmentDto
>>
resultPicMap
=
new
HashMap
<>();
resultPicMap
.
put
(
TzsCommonParam
.
LICENCE_PIC
,
model
.
getLicencePic
());
resultPicMap
.
put
(
TzsCommonParam
.
ADMIN_LICENSE_PIC
,
model
.
getAdminLicensePic
());
ISourceFileService
.
saveAttachments
(
entity
.
getSequenceNbr
(),
resultPicMap
);
}
return
Bean
.
toModel
(
entity
,
model
);
}
@Transactional
@Override
public
UnitInfoDto
approve
(
UnitInfoApproveDto
approveDto
)
{
UnitInfoDto
result
=
null
;
// 如果不存在审批意见 则 默认 通过 / 驳回
// 通过unitid 查找企业信息表 如果不存在则查找 变更表 都不存在返回未找到企业审核表单
String
content
=
approveDto
.
getContent
();
// 审批意见
UnitInfo
sourceUnit
=
this
.
getById
(
approveDto
.
getUnitId
());
UnitInfoChange
changeUnit
=
null
;
if
(
sourceUnit
==
null
)
{
changeUnit
=
iUnitInfoChangeServiceImpl
.
getById
(
approveDto
.
getUnitId
());
if
(
changeUnit
==
null
)
{
throw
new
BadRequest
(
"未找到企业审核表单."
);
}
sourceUnit
=
this
.
getById
(
changeUnit
.
getSourceId
());
}
if
(
sourceUnit
.
getUnitStatus
()
!=
0
)
{
// 无论变更单还是新建单 原始单状态都应该为审核中
throw
new
BadRequest
(
"表单未处于审核状态中.请确认后操作"
);
}
Integer
approveStatus
=
approveDto
.
getApproveStatus
();
// 0通过 1驳回
Boolean
changeFlag
=
false
;
if
(
changeUnit
!=
null
)
{
changeFlag
=
true
;
approveDto
.
setUnitId
(
changeUnit
.
getSequenceNbr
());
approveDto
.
setApproveType
(
1
);
// 0 注册审批 1 变更审批
}
else
{
approveDto
.
setApproveType
(
0
);
// 0 注册审批 1 变更审批
}
approveDto
.
setSourceId
(
sourceUnit
.
getSequenceNbr
());
if
(
0
==
approveStatus
)
{
// 审核通过生成二维码
this
.
saveUnitInfoQrCode
(
sourceUnit
);
if
(
StringUtils
.
isEmpty
(
content
))
{
content
=
"通过"
;
}
sourceUnit
.
setUnitStatus
(
1
);
if
(
changeFlag
)
{
// 如果是变更单 需要把 变更数据覆盖到原单子 预留(确定字段)
}
else
{
// 如果是审批单 创建用户 创建组织机构 赋权等
sourceUnit
.
setApprovedTime
(
new
Date
());
// 创建用户 创建组织机构 平台组织机构及 org_user表中 赋权
String
adminUserName
=
sourceUnit
.
getAdminName
();
String
loginName
=
sourceUnit
.
getAdminLoginName
();
String
pwd
=
sourceUnit
.
getAdminLoginPwd
();
String
adminTel
=
sourceUnit
.
getAdminTel
();
CompanyModel
companyInfo
=
new
CompanyModel
();
companyInfo
.
setAddress
(
sourceUnit
.
getProvince
()
+
sourceUnit
.
getCity
()
+
sourceUnit
.
getDistrict
()
+
sourceUnit
.
getStree
()
+
sourceUnit
.
getCommunity
()
+
sourceUnit
.
getAddress
());
companyInfo
.
setAgencyCode
(
"tzs"
);
companyInfo
.
setParentId
(
sourceUnit
.
getManagementUnitId
());
companyInfo
.
setLevel
(
"headquarter"
);
companyInfo
.
setCompanyName
(
sourceUnit
.
getOrgName
());
companyInfo
.
setContact
(
sourceUnit
.
getUnitTel
());
FeignClientResult
<
CompanyModel
>
companyResult
=
Privilege
.
companyClient
.
create
(
companyInfo
);
if
(
companyResult
==
null
||
companyResult
.
getResult
()
==
null
)
{
throw
new
BadRequest
(
"单位注册失败"
);
}
companyInfo
=
companyResult
.
getResult
();
AgencyUserModel
agencyUserModel
=
new
AgencyUserModel
();
agencyUserModel
.
setUserName
(
loginName
);
agencyUserModel
.
setRealName
(
adminUserName
);
agencyUserModel
.
setLockStatus
(
"UNLOCK"
);
agencyUserModel
.
setPassword
(
pwd
);
agencyUserModel
.
setRePassword
(
pwd
);
agencyUserModel
.
setAgencyCode
(
"tzs"
);
agencyUserModel
.
setMobile
(
adminTel
);
// 根据unitTypeCode 获取应用和 角色
String
unitTypeCode
=
sourceUnit
.
getUnitTypeCode
();
String
[]
unitTypeCodes
=
unitTypeCode
.
split
(
","
);
Set
<
String
>
roleNameSet
=
new
HashSet
<>();
Set
<
String
>
appCodesSet
=
new
HashSet
<>();
Map
<
Long
,
List
<
Long
>>
roleSeqsMap
=
new
HashMap
<>();
for
(
String
code
:
unitTypeCodes
)
{
DataDictionary
unitType
=
iDataDictionaryService
.
getOne
(
new
LambdaQueryWrapper
<
DataDictionary
>().
eq
(
DataDictionary:
:
getCode
,
code
));
String
appCode
=
unitType
.
getTypeDesc
();
String
[]
appCodes
=
appCode
.
split
(
","
);
for
(
String
tempCode
:
appCodes
)
{
appCodesSet
.
add
(
tempCode
);
}
roleNameSet
.
add
(
unitType
.
getName
());
}
List
<
RoleModel
>
userRoleList
=
new
ArrayList
<>();
// 全部角色筛选
// 获取角色
FeignClientResult
<
List
<
RoleModel
>>
roleListResult
=
Privilege
.
roleClient
.
queryRoleList
(
null
,
null
);
List
<
RoleModel
>
allRoleList
=
roleListResult
.
getResult
();
allRoleList
.
stream
().
forEach
(
t
->
{
if
(
roleNameSet
.
contains
(
t
.
getRoleName
()))
{
userRoleList
.
add
(
t
);
}
});
List
<
Long
>
roleIds
=
new
ArrayList
<>();
userRoleList
.
stream
().
forEach
(
r
->
{
roleIds
.
add
(
r
.
getSequenceNbr
());
});
roleSeqsMap
.
put
(
companyInfo
.
getSequenceNbr
(),
roleIds
);
List
<
String
>
appCodes
=
new
ArrayList
<>(
appCodesSet
);
agencyUserModel
.
setAppCodes
(
appCodes
);
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
new
HashMap
<>();
orgRoles
.
put
(
companyInfo
.
getSequenceNbr
(),
userRoleList
);
agencyUserModel
.
setOrgRoles
(
orgRoles
);
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqsMap
);
FeignClientResult
<
AgencyUserModel
>
userResult
=
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
if
(
userResult
==
null
||
userResult
.
getResult
()
==
null
)
{
throw
new
BadRequest
(
"注册失败"
);
}
// org_user 创建组织机构
OrgUsr
org
=
new
OrgUsr
();
TreeParser
.
genTreeCode
();
org
.
setBizOrgCode
(
TreeParser
.
genTreeCode
());
org
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_COMPANY
);
org
.
setBizOrgName
(
sourceUnit
.
getOrgName
());
org
.
setRecDate
(
new
Date
());
org
.
setRecUserId
(
userResult
.
getResult
().
getUserId
());
org
.
setRecUserName
(
userResult
.
getResult
().
getUserName
());
if
(!
iOrgUsrService
.
save
(
org
))
{
throw
new
BadRequest
(
"org单位注册失败"
);
}
sourceUnit
.
setOrgUserId
(
org
.
getSequenceNbr
());
}
}
else
if
(
1
==
approveStatus
)
{
if
(
StringUtils
.
isEmpty
(
content
))
{
content
=
"驳回"
;
}
sourceUnit
.
setUnitStatus
(
2
);
}
approveDto
.
setContent
(
content
);
iUnitInfoApproveServiceImpl
.
createWithModel
(
approveDto
);
if
(
this
.
updateById
(
sourceUnit
))
{
if
(
changeFlag
&&
1
==
approveStatus
)
{
// 变更不通过返回变更表数据 其他情况返回原数据
result
=
unitChangeInfoToDto
(
changeUnit
);
}
else
{
result
=
unitInfoToDto
(
sourceUnit
);
}
}
return
result
;
}
}
/**
@Override
* 列表查询 示例
public
UnitInfoDto
getDtoById
(
Long
sequenceNbr
)
{
*/
UnitInfo
unitInfo
=
this
.
getById
(
sequenceNbr
);
public
List
<
UnitInfoDto
>
queryForFlcUnitInfoList
()
{
UnitInfoDto
result
=
null
;
return
this
.
queryForList
(
""
,
false
);
// 如果是变更单 同时为 审批中,默认展示变更表中最新数据
if
(
unitInfo
.
getIsChange
()
&&
unitInfo
.
getUnitStatus
()
==
0
)
{
List
<
UnitInfoChange
>
changeList
=
unitInfoChangeServiceImpl
.
list
(
new
LambdaQueryWrapper
<
UnitInfoChange
>().
eq
(
UnitInfoChange:
:
getIsDelete
,
false
).
eq
(
UnitInfoChange:
:
getSourceId
,
sequenceNbr
).
orderByDesc
(
UnitInfoChange:
:
getRecDate
));
UnitInfoChange
temp
=
changeList
.
get
(
0
);
result
=
unitChangeInfoToDto
(
temp
);
}
else
{
result
=
unitInfoToDto
(
unitInfo
);
}
return
result
;
}
private
UnitInfoDto
unitInfoToDto
(
UnitInfo
source
)
{
UnitInfoDto
target
=
new
UnitInfoDto
();
// 把原对象数据拷贝到新对象
BeanUtils
.
copyProperties
(
source
,
target
);
if
(
source
.
getIsChange
())
{
target
.
setTypeStr
(
"变更"
);
}
else
{
target
.
setTypeStr
(
"注册"
);
}
if
(
0
==
source
.
getUnitStatus
())
{
target
.
setStatusStr
(
"审批中"
);
}
else
if
(
1
==
source
.
getUnitStatus
())
{
target
.
setStatusStr
(
"审批结束"
);
}
else
if
(
2
==
source
.
getUnitStatus
())
{
target
.
setStatusStr
(
"已驳回"
);
}
Map
<
String
,
List
<
AttachmentDto
>>
attachmentMap
=
sourceFileService
.
getAttachments
(
source
.
getSequenceNbr
());
// 获取企业二维码
if
(
attachmentMap
!=
null
)
{
if
(
attachmentMap
.
get
(
TzsCommonParam
.
QR_CODE
)
!=
null
)
{
target
.
setQrcode
(
attachmentMap
.
get
(
TzsCommonParam
.
QR_CODE
));
}
if
(
attachmentMap
.
get
(
TzsCommonParam
.
LICENCE_PIC
)
!=
null
)
{
target
.
setLicencePic
(
attachmentMap
.
get
(
TzsCommonParam
.
LICENCE_PIC
));
}
if
(
attachmentMap
.
get
(
TzsCommonParam
.
ADMIN_LICENSE_PIC
)
!=
null
)
{
target
.
setAdminLicensePic
(
attachmentMap
.
get
(
TzsCommonParam
.
ADMIN_LICENSE_PIC
));
}
}
target
.
setFullAddress
(
source
.
getProvince
()
+
source
.
getCity
()
+
source
.
getDistrict
()
+
source
.
getStree
()
+
source
.
getCommunity
()
+
source
.
getAddress
());
return
target
;
}
private
UnitInfoDto
unitChangeInfoToDto
(
UnitInfoChange
source
)
{
UnitInfoDto
target
=
new
UnitInfoDto
();
// 把原对象数据拷贝到新对象
BeanUtils
.
copyProperties
(
source
,
target
);
if
(
0
==
source
.
getUnitStatus
())
{
target
.
setStatusStr
(
"审批中"
);
}
else
if
(
1
==
source
.
getUnitStatus
())
{
target
.
setStatusStr
(
"审批结束"
);
}
else
if
(
2
==
source
.
getUnitStatus
())
{
target
.
setStatusStr
(
"已驳回"
);
}
Map
<
String
,
List
<
AttachmentDto
>>
attachmentMap
=
sourceFileService
.
getAttachments
(
source
.
getSourceId
());
// 获取附件信息
if
(
attachmentMap
!=
null
)
{
if
(
attachmentMap
.
get
(
TzsCommonParam
.
QR_CODE
)
!=
null
)
{
target
.
setQrcode
(
attachmentMap
.
get
(
TzsCommonParam
.
QR_CODE
));
}
if
(
attachmentMap
.
get
(
TzsCommonParam
.
LICENCE_PIC
)
!=
null
)
{
target
.
setLicencePic
(
attachmentMap
.
get
(
TzsCommonParam
.
LICENCE_PIC
));
}
if
(
attachmentMap
.
get
(
TzsCommonParam
.
ADMIN_LICENSE_PIC
)
!=
null
)
{
target
.
setAdminLicensePic
(
attachmentMap
.
get
(
TzsCommonParam
.
ADMIN_LICENSE_PIC
));
}
}
target
.
setFullAddress
(
source
.
getProvince
()
+
source
.
getCity
()
+
source
.
getDistrict
()
+
source
.
getStree
()
+
source
.
getCommunity
()
+
source
.
getAddress
());
return
target
;
}
private
String
saveUnitInfoQrCode
(
UnitInfo
sourceUnit
)
{
// 二维码生成规则
String
qrString
=
"企业统一信用代码: "
+
sourceUnit
.
getOrganizationCode
()
+
"\n\r"
;
qrString
+=
"管理人: "
+
sourceUnit
.
getAdminName
()
+
"\n\r"
;
qrString
+=
"管理人电话: "
+
sourceUnit
.
getAdminTel
()
+
"\n\r"
;
byte
[]
bytes
=
QRCodeUtil
.
generateQRCodeImageByteData
(
qrString
,
480
);
MultipartFile
file
=
new
MockMultipartFile
(
"unitInfo_"
+
sourceUnit
.
getSequenceNbr
()
+
".png"
,
"unitInfo_"
+
sourceUnit
.
getSequenceNbr
()
+
".png"
,
"application/octet-stream"
,
bytes
);
FeignClientResult
<
Map
<
String
,
String
>>
result
=
Systemctl
.
fileStorageClient
.
updateCommonFile
(
file
);
Map
<
String
,
String
>
map
=
result
.
getResult
();
if
(
map
.
isEmpty
())
{
logger
.
error
(
"未生成二维码文件"
);
throw
new
BadRequest
(
"未生成二维码文件"
);
}
String
filePath
=
""
;
for
(
Map
.
Entry
<
String
,
String
>
fileResult
:
map
.
entrySet
())
{
filePath
=
fileResult
.
getKey
();
}
// 保存qrCode
List
<
AttachmentDto
>
qrCode
=
new
ArrayList
<>();
AttachmentDto
temp
=
new
AttachmentDto
();
temp
.
setName
(
"unitInfo_"
+
sourceUnit
.
getSequenceNbr
()
+
".png"
);
temp
.
setType
(
"image"
);
temp
.
setUrl
(
filePath
);
qrCode
.
add
(
temp
);
Map
<
String
,
List
<
AttachmentDto
>>
attachmentMap
=
new
HashMap
<>();
attachmentMap
.
put
(
TzsCommonParam
.
QR_CODE
,
qrCode
);
sourceFileService
.
saveAttachments
(
sourceUnit
.
getSequenceNbr
(),
attachmentMap
);
return
filePath
;
}
}
}
}
\ No newline at end of file
amos-boot-system-tzs/src/main/resources/application-dev.properties
View file @
eb28cd4a
...
@@ -75,4 +75,6 @@ mqtt.topic.cti.push=/cti/record
...
@@ -75,4 +75,6 @@ mqtt.topic.cti.push=/cti/record
cti.user.name
=
tzs_cti
cti.user.name
=
tzs_cti
cti.user.pwd
=
a1234567
cti.user.pwd
=
a1234567
\ No newline at end of file
flc.sms.tempCode
=
SMS_TZS_0001
\ No newline at end of file
amos-boot-system-tzs/src/main/resources/application-qa.properties
View file @
eb28cd4a
...
@@ -81,3 +81,5 @@ mqtt.topic.cti.push=/cti/record
...
@@ -81,3 +81,5 @@ mqtt.topic.cti.push=/cti/record
cti.user.name
=
tzs_cti
cti.user.name
=
tzs_cti
cti.user.pwd
=
a1234567
cti.user.pwd
=
a1234567
flc.sms.tempCode
=
SMS_TZS_0001
amos-boot-system-tzs/src/main/resources/db/changelog/tzs-1.0.0.0.xml
View file @
eb28cd4a
...
@@ -103,6 +103,204 @@
...
@@ -103,6 +103,204 @@
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"kongfm"
id=
"2021-11-17-01"
>
<preConditions
onFail=
"MARK_RAN"
>
<primaryKeyExists
primaryKeyName=
"sequence_nbr"
tableName=
"cb_data_dictionary"
/>
</preConditions>
<comment>
add data_dictionary
</comment>
<sql>
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1043, '1043', '监管单位', 'UNIT_TYPE', 'studio_normalapp_3228379,studio_normalapp_3261162', NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1044, '1044', '检验单位', 'UNIT_TYPE', 'studio_normalapp_3228379,studio_normalapp_3261162', NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1045, '1045', '检测单位', 'UNIT_TYPE', 'studio_normalapp_3228379,studio_normalapp_3261162', NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1046, '1046', '设计单位', 'UNIT_TYPE', 'studio_normalapp_3228379,studio_normalapp_3261162', NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1047, '1047', '制造单位', 'UNIT_TYPE', 'studio_normalapp_3228379,studio_normalapp_3261162', NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1048, '1048', '安装单位', 'UNIT_TYPE', 'studio_normalapp_3228379,studio_normalapp_3261162', NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1049, '1049', '改造单位', 'UNIT_TYPE', 'studio_normalapp_3228379,studio_normalapp_3261162', NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1050, '1050', '维修单位', 'UNIT_TYPE', 'studio_normalapp_3228379,studio_normalapp_3261162', NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1051, '1051', '使用单位', 'UNIT_TYPE', 'studio_normalapp_3228379,studio_normalapp_3261162', NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1052, '1052', '维保单位', 'UNIT_TYPE', 'studio_normalapp_3228379,studio_normalapp_3261162', NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1053, '1053', '物业单位', 'UNIT_TYPE', 'studio_normalapp_3228379,studio_normalapp_3261162', NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1054, '1054', '保险公司', 'UNIT_TYPE', 'studio_normalapp_3228379,studio_normalapp_3261162', NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1055, '1055', '物联网公司', 'UNIT_TYPE', 'studio_normalapp_3228379,studio_normalapp_3261162', NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1056, '1056', '气瓶充装单位', 'UNIT_TYPE', 'studio_normalapp_3228379,studio_normalapp_3261162', NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1057, '1057', '经营单位', 'UNIT_TYPE', 'studio_normalapp_3228379,studio_normalapp_3261162', NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1058, '1058', '其他', 'UNIT_TYPE', 'studio_normalapp_3228379,studio_normalapp_3261162', NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1059, '1059', '组织机构代码证', 'LICENSE_TYPE', NULL, NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1060, '1060', '营业执照', 'LICENSE_TYPE', NULL, NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1061, '1061', 'A', 'QUALIFICATION_LEVEL', NULL, NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1062, '1062', 'B', 'QUALIFICATION_LEVEL', NULL, NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1063, '1063', 'C', 'QUALIFICATION_LEVEL', NULL, NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1064, '1064', 'D', 'QUALIFICATION_LEVEL', NULL, NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1065, '1065', '行业', 'COMPTENT_DEPT', NULL, NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1066, '1066', '住建', 'COMPTENT_DEPT', NULL, NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1067, '1067', '文旅', 'COMPTENT_DEPT', NULL, NULL, NULL, NULL, NULL, b'0', 1);
INSERT INTO `cb_data_dictionary` (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1068, '1068', '化工', 'COMPTENT_DEPT', NULL, NULL, NULL, NULL, NULL, b'0', 1);
</sql>
</changeSet>
<changeSet
author=
"kongfm"
id=
"2021-11-17-02"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"tz_flc_unit_info"
/>
</not>
</preConditions>
<comment>
add tz_flc_unit_info table
</comment>
<sql>
CREATE TABLE `tz_flc_unit_info` (
`sequence_nbr` bigint(30) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`org_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位名称',
`licence_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '证照类型',
`licence_type_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '证照类型code',
`organization_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织机构编码',
`unit_type` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位类型',
`unit_type_code` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位类型code',
`comptent_dept` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主管部门',
`comptent_dept_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主管部门编号',
`approve_org` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '批准成立机关',
`registration_authority` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登记机构',
`region_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '区域编码',
`country` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '国家',
`province` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '省',
`city` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市',
`district` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '县区',
`stree` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '街道',
`community` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '小区',
`address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '详细地址',
`longitude` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经度',
`latitude` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '纬度',
`management_unit` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管辖单位',
`management_unit_id` bigint(30) NULL DEFAULT NULL COMMENT '管辖单位id',
`qualification_level` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资质等级',
`qualification_level_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资质等级编号',
`create_time` datetime NULL DEFAULT NULL COMMENT '成立日期',
`legal_person` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位法人',
`legal_person_tel` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '法人电话',
`contact_person` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位联系人',
`contact_person_tel` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人电话',
`unit_tel` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位电话',
`admin_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理员姓名',
`admin_login_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理员用户名',
`admin_login_pwd` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理员密码',
`admin_tel` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理员手机号',
`org_user_id` bigint(32) NULL DEFAULT NULL COMMENT 'org_user_id',
`unit_status` int(11) NULL DEFAULT NULL COMMENT '审批状态 0 审批中 1 审批结束 2 驳回',
`rec_user_id` bigint(30) NULL DEFAULT NULL COMMENT '更新人id',
`rec_user_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人名称',
`rec_date` datetime NULL DEFAULT NULL COMMENT '更新时间',
`is_delete` bit(1) NULL DEFAULT b'0' COMMENT '是否删除(0:未删除,1:已删除)',
`is_change` bit(1) NULL DEFAULT NULL COMMENT '是否变更(0:未变更,1:变更中)',
`approved_time` datetime NULL DEFAULT NULL COMMENT '企业入驻时间',
`submit_time` datetime NULL DEFAULT NULL COMMENT '提交时间',
PRIMARY KEY (`sequence_nbr`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1460504125366816771 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '企业信息表' ROW_FORMAT = Dynamic;
</sql>
</changeSet>
<changeSet
author=
"kongfm"
id=
"2021-11-17-03"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"tz_flc_unit_info_approve"
/>
</not>
</preConditions>
<comment>
add tz_flc_unit_info_approve table
</comment>
<sql>
CREATE TABLE `tz_flc_unit_info_approve` (
`sequence_nbr` bigint(30) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`unit_id` bigint(30) NULL DEFAULT NULL COMMENT 'unit_info_id',
`source_id` bigint(30) NULL DEFAULT NULL COMMENT 'unit_info原表单id',
`content` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '审批意见',
`approve_status` int(11) NULL DEFAULT NULL COMMENT '审批结果 0 通过 1 驳回',
`approve_type` int(1) NULL DEFAULT NULL COMMENT '0 注册审批 1 变更审批',
`rec_user_id` bigint(30) NULL DEFAULT NULL COMMENT '审批人id',
`rec_user_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '审批人',
`rec_date` datetime NULL DEFAULT NULL COMMENT '审批日期',
`is_delete` bit(1) NULL DEFAULT b'0' COMMENT '是否删除(0:未删除,1:已删除)',
PRIMARY KEY (`sequence_nbr`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1460809880397582339 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '企业信息审批意见表' ROW_FORMAT = Dynamic;
</sql>
</changeSet>
<changeSet
author=
"kongfm"
id=
"2021-11-17-04"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"tz_flc_unit_info_change"
/>
</not>
</preConditions>
<comment>
add tz_flc_unit_info_change table
</comment>
<sql>
CREATE TABLE `tz_flc_unit_info_change` (
`sequence_nbr` bigint(30) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`org_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位名称',
`licence_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '证照类型',
`licence_type_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '证照类型code',
`unit_type` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位类型',
`unit_type_code` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位类型code',
`comptent_dept` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主管部门',
`comptent_dept_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主管部门编号',
`approve_org` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '批准成立机关',
`registration_authority` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登记机构',
`region_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '区域编码',
`country` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '国家',
`province` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '省',
`city` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市',
`district` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '县区',
`stree` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '街道',
`community` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '小区',
`address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '详细地址',
`longitude` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经度',
`latitude` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '纬度',
`management_unit` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管辖单位',
`management_unit_id` bigint(30) NULL DEFAULT NULL COMMENT '管辖单位id',
`qualification_level` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资质等级',
`qualification_level_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资质等级编号',
`create_time` datetime NULL DEFAULT NULL COMMENT '成立日期',
`legal_person` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位法人',
`legal_person_tel` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '法人电话',
`contact_person` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位联系人',
`contact_person_tel` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人电话',
`unit_tel` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位电话',
`source_id` bigint(30) NULL DEFAULT NULL COMMENT '原记录id(unit_info)',
`unit_status` int(11) NULL DEFAULT NULL COMMENT '审批状态 0 审批中 1 审批结束 2 驳回',
`rec_user_id` bigint(30) NULL DEFAULT NULL COMMENT '更新人id',
`rec_user_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人名称',
`rec_date` datetime NULL DEFAULT NULL COMMENT '更新时间',
`is_delete` bit(1) NULL DEFAULT b'0' COMMENT '是否删除(0:未删除,1:已删除)',
`organization_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织机构编码',
`approved_time` datetime NULL DEFAULT NULL COMMENT '企业入驻时间',
`submit_time` datetime NULL DEFAULT NULL COMMENT '提交时间',
PRIMARY KEY (`sequence_nbr`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1458311353490657283 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '企业信息变更表' ROW_FORMAT = Dynamic;
</sql>
</changeSet>
<changeSet
author=
"kongfm"
id=
"2021-11-17-05"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<primaryKeyExists
primaryKeyName=
"sequence_nbr"
tableName=
"cb_data_dictionary"
/>
</not>
</preConditions>
<comment>
update cb_data_dictionary UNIT_TYPE
</comment>
<sql>
UPDATE `cb_data_dictionary` SET `code` = '1043', `name` = '监管单位', `type` = 'UNIT_TYPE', `type_desc` = 'studio_normalapp_3477687,studio_normalapp_3261162', `parent` = NULL, `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 1043;
UPDATE `cb_data_dictionary` SET `code` = '1044', `name` = '检验单位', `type` = 'UNIT_TYPE', `type_desc` = 'studio_normalapp_3477687,studio_normalapp_3261162', `parent` = NULL, `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 1044;
UPDATE `cb_data_dictionary` SET `code` = '1045', `name` = '检测单位', `type` = 'UNIT_TYPE', `type_desc` = 'studio_normalapp_3477687,studio_normalapp_3261162', `parent` = NULL, `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 1045;
UPDATE `cb_data_dictionary` SET `code` = '1046', `name` = '设计单位', `type` = 'UNIT_TYPE', `type_desc` = 'studio_normalapp_3477687,studio_normalapp_3261162', `parent` = NULL, `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 1046;
UPDATE `cb_data_dictionary` SET `code` = '1047', `name` = '制造单位', `type` = 'UNIT_TYPE', `type_desc` = 'studio_normalapp_3477687,studio_normalapp_3261162', `parent` = NULL, `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 1047;
UPDATE `cb_data_dictionary` SET `code` = '1048', `name` = '安装单位', `type` = 'UNIT_TYPE', `type_desc` = 'studio_normalapp_3477687,studio_normalapp_3261162', `parent` = NULL, `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 1048;
UPDATE `cb_data_dictionary` SET `code` = '1049', `name` = '改造单位', `type` = 'UNIT_TYPE', `type_desc` = 'studio_normalapp_3477687,studio_normalapp_3261162', `parent` = NULL, `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 1049;
UPDATE `cb_data_dictionary` SET `code` = '1050', `name` = '维修单位', `type` = 'UNIT_TYPE', `type_desc` = 'studio_normalapp_3477687,studio_normalapp_3261162', `parent` = NULL, `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 1050;
UPDATE `cb_data_dictionary` SET `code` = '1051', `name` = '使用单位', `type` = 'UNIT_TYPE', `type_desc` = 'studio_normalapp_3477687,studio_normalapp_3261162', `parent` = NULL, `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 1051;
UPDATE `cb_data_dictionary` SET `code` = '1052', `name` = '维保单位', `type` = 'UNIT_TYPE', `type_desc` = 'studio_normalapp_3477687,studio_normalapp_3261162', `parent` = NULL, `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 1052;
UPDATE `cb_data_dictionary` SET `code` = '1053', `name` = '物业单位', `type` = 'UNIT_TYPE', `type_desc` = 'studio_normalapp_3477687,studio_normalapp_3261162', `parent` = NULL, `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 1053;
UPDATE `cb_data_dictionary` SET `code` = '1054', `name` = '保险公司', `type` = 'UNIT_TYPE', `type_desc` = 'studio_normalapp_3477687,studio_normalapp_3261162', `parent` = NULL, `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 1054;
UPDATE `cb_data_dictionary` SET `code` = '1055', `name` = '物联网公司', `type` = 'UNIT_TYPE', `type_desc` = 'studio_normalapp_3477687,studio_normalapp_3261162', `parent` = NULL, `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 1055;
UPDATE `cb_data_dictionary` SET `code` = '1056', `name` = '气瓶充装单位', `type` = 'UNIT_TYPE', `type_desc` = 'studio_normalapp_3477687,studio_normalapp_3261162', `parent` = NULL, `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 1056;
UPDATE `cb_data_dictionary` SET `code` = '1057', `name` = '经营单位', `type` = 'UNIT_TYPE', `type_desc` = 'studio_normalapp_3477687,studio_normalapp_3261162', `parent` = NULL, `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 1057;
UPDATE `cb_data_dictionary` SET `code` = '1058', `name` = '其他', `type` = 'UNIT_TYPE', `type_desc` = 'studio_normalapp_3477687,studio_normalapp_3261162', `parent` = NULL, `rec_user_name` = NULL, `rec_user_id` = NULL, `rec_date` = NULL, `is_delete` = b'0', `sort_num` = 1 WHERE `sequence_nbr` = 1058;
</sql>
</changeSet>
</databaseChangeLog>
</databaseChangeLog>
pom.xml
View file @
eb28cd4a
...
@@ -210,7 +210,7 @@
...
@@ -210,7 +210,7 @@
<dependency>
<dependency>
<groupId>
com.yeejoin
</groupId>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-feign-systemctl
</artifactId>
<artifactId>
amos-feign-systemctl
</artifactId>
<version>
1.6.4-SNAPSHOT
</version>
<version>
${amos.version}
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
io.swagger
</groupId>
<groupId>
io.swagger
</groupId>
...
...
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