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
0f8c4c2d
Commit
0f8c4c2d
authored
Aug 21, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix():服务迁移,tcm和ymt统计接口迁移至statistics
parent
54ab7698
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
139 additions
and
11 deletions
+139
-11
pom.xml
...module-statistics/amos-boot-module-statistics-biz/pom.xml
+5
-0
AmosStatisticsApplication.java
...main/java/com/yeejoin/amos/AmosStatisticsApplication.java
+2
-5
EnterpriseBizController.java
...ule/statistcs/biz/controller/EnterpriseBizController.java
+17
-2
EquipmentBizController.java
...dule/statistcs/biz/controller/EquipmentBizController.java
+64
-0
StCommonController.java
...t/module/statistcs/biz/controller/StCommonController.java
+15
-2
EquipmentBizServiceImpl.java
...e/statistcs/biz/service/impl/EquipmentBizServiceImpl.java
+34
-0
company.json
...odule-statistics-biz/src/main/resources/json/company.json
+2
-2
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/pom.xml
View file @
0f8c4c2d
...
@@ -25,6 +25,11 @@
...
@@ -25,6 +25,11 @@
<groupId>
com.baomidou
</groupId>
<groupId>
com.baomidou
</groupId>
<artifactId>
dynamic-datasource-spring-boot-starter
</artifactId>
<artifactId>
dynamic-datasource-spring-boot-starter
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-module-tcm-api
</artifactId>
<version>
${amos-boot-biz.version}
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/AmosStatisticsApplication.java
View file @
0f8c4c2d
package
com
.
yeejoin
.
amos
;
package
com
.
yeejoin
.
amos
;
import
com.yeejoin.amos.boot.biz.common.utils.oConvertUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.oConvertUtils
;
import
net.javacrumbs.shedlock.spring.annotation.EnableSchedulerLock
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -10,13 +9,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
...
@@ -10,13 +9,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc
;
import
java.net.InetAddress
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
import
java.net.UnknownHostException
;
...
@@ -36,7 +32,8 @@ import java.net.UnknownHostException;
...
@@ -36,7 +32,8 @@ import java.net.UnknownHostException;
@EnableSwagger2WebMvc
@EnableSwagger2WebMvc
@MapperScan
({
"org.typroject.tyboot.demo.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
@MapperScan
({
"org.typroject.tyboot.demo.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
"org.typroject.tyboot.core.auth.face.orm.dao*"
,
"org.typroject.tyboot.component.*.face.orm.dao*"
,
"org.typroject.tyboot.core.auth.face.orm.dao*"
,
"org.typroject.tyboot.component.*.face.orm.dao*"
,
"com.yeejoin.amos.boot.module.**.api.mapper"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
})
"com.yeejoin.amos.boot.module.**.api.mapper"
,
"com.yeejoin.amos.boot.module.**.api.service"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
})
@ComponentScan
(
basePackages
=
{
"org.typroject"
,
"com.yeejoin.amos"
})
@ComponentScan
(
basePackages
=
{
"org.typroject"
,
"com.yeejoin.amos"
})
public
class
AmosStatisticsApplication
{
public
class
AmosStatisticsApplication
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AmosStatisticsApplication
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AmosStatisticsApplication
.
class
);
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/EnterpriseBizController.java
View file @
0f8c4c2d
...
@@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.EnterpriseBizServiceImpl
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.EnterpriseBizServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.PageParam
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.PageParam
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ITzBaseEnterpriseInfoService
;
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.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -14,6 +16,8 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...
@@ -14,6 +16,8 @@ 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
java.util.Map
;
/**
/**
* @author Administrator
* @author Administrator
*/
*/
...
@@ -22,10 +26,14 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
...
@@ -22,10 +26,14 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
@Api
(
tags
=
"大屏-企业-业务API"
)
@Api
(
tags
=
"大屏-企业-业务API"
)
public
class
EnterpriseBizController
{
public
class
EnterpriseBizController
{
private
EnterpriseBizServiceImpl
enterpriseBizService
;
private
final
EnterpriseBizServiceImpl
enterpriseBizService
;
private
final
ITzBaseEnterpriseInfoService
iTzBaseEnterpriseInfoService
;
public
EnterpriseBizController
(
EnterpriseBizServiceImpl
enterpriseBizService
)
{
@Autowired
public
EnterpriseBizController
(
EnterpriseBizServiceImpl
enterpriseBizService
,
ITzBaseEnterpriseInfoService
iTzBaseEnterpriseInfoService
)
{
this
.
enterpriseBizService
=
enterpriseBizService
;
this
.
enterpriseBizService
=
enterpriseBizService
;
this
.
iTzBaseEnterpriseInfoService
=
iTzBaseEnterpriseInfoService
;
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
...
@@ -35,4 +43,11 @@ public class EnterpriseBizController {
...
@@ -35,4 +43,11 @@ public class EnterpriseBizController {
TzBaseEnterpriseInfoDto
tzBaseEnterpriseInfoDto
)
{
TzBaseEnterpriseInfoDto
tzBaseEnterpriseInfoDto
)
{
return
ResponseHelper
.
buildResponse
(
enterpriseBizService
.
page
(
pageParam
,
tzBaseEnterpriseInfoDto
));
return
ResponseHelper
.
buildResponse
(
enterpriseBizService
.
page
(
pageParam
,
tzBaseEnterpriseInfoDto
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getInfoByUseCode/map"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据统一信用代码查询企业详情返回map"
,
notes
=
"根据统一信用代码查询企业详情返回map"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getInfoByUseCodeMap
(
String
useCode
)
{
return
ResponseHelper
.
buildResponse
(
iTzBaseEnterpriseInfoService
.
getInfoByUseCodeMap
(
useCode
));
}
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/EquipmentBizController.java
0 → 100644
View file @
0f8c4c2d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
controller
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.EquipmentBizServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.service.IEquipmentCategoryService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author Administrator
*/
@RestController
@RequestMapping
(
value
=
"/dp/biz-equipment"
)
@Api
(
tags
=
"大屏-设备相关-业务API"
)
public
class
EquipmentBizController
{
private
final
IEquipmentCategoryService
equipmentCategoryService
;
private
final
EquipmentBizServiceImpl
equipmentBizServiceImpl
;
@Autowired
public
EquipmentBizController
(
IEquipmentCategoryService
equipmentCategoryService
,
EquipmentBizServiceImpl
equipmentBizServiceImpl
)
{
this
.
equipmentCategoryService
=
equipmentCategoryService
;
this
.
equipmentBizServiceImpl
=
equipmentBizServiceImpl
;
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getFormRecordById/map"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"表格查询详情"
,
notes
=
"表格查询详情"
)
public
ResponseModel
<
Object
>
getFormRecordByIdMap
(
@RequestParam
Map
<
String
,
Object
>
map
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
getFormRecordByIdMap
(
map
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getChildren"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过设备种类code获取设备类别"
,
notes
=
"通过设备种类code获取设备类别"
)
public
ResponseModel
<
List
<
EquipmentCategory
>>
getChildren
(
String
code
)
{
return
ResponseHelper
.
buildResponse
(
equipmentBizServiceImpl
.
getChildren
(
code
));
}
/**
* 获取管辖分局树
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/creatTree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取管辖分局树"
,
notes
=
"获取管辖分局树"
)
public
ResponseModel
<
Object
>
creatTree
()
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
getTree
());
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/StCommonController.java
View file @
0f8c4c2d
...
@@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSONArray;
...
@@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.StCommonServiceImpl
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.StCommonServiceImpl
;
import
com.yeejoin.amos.boot.module.
statistics.api.vo.EquCategoryVo
;
import
com.yeejoin.amos.boot.module.
tcm.flc.api.service.IRegUnitInfoService
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
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.ApiOperation
;
...
@@ -13,6 +13,8 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
...
@@ -13,6 +13,8 @@ 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
java.util.Collection
;
import
java.util.List
;
import
java.util.List
;
@RestController
@RestController
...
@@ -21,9 +23,12 @@ import java.util.List;
...
@@ -21,9 +23,12 @@ import java.util.List;
public
class
StCommonController
extends
BaseController
{
public
class
StCommonController
extends
BaseController
{
private
StCommonServiceImpl
commonService
;
private
StCommonServiceImpl
commonService
;
private
IRegUnitInfoService
iregUnitInfoService
;
public
StCommonController
(
StCommonServiceImpl
commonService
)
{
public
StCommonController
(
StCommonServiceImpl
commonService
,
IRegUnitInfoService
iregUnitInfoService
)
{
this
.
commonService
=
commonService
;
this
.
commonService
=
commonService
;
this
.
iregUnitInfoService
=
iregUnitInfoService
;
}
}
/**
/**
...
@@ -50,4 +55,12 @@ public class StCommonController extends BaseController {
...
@@ -50,4 +55,12 @@ public class StCommonController extends BaseController {
return
ResponseHelper
.
buildResponse
(
objects
);
return
ResponseHelper
.
buildResponse
(
objects
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/management-unit/tree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"管辖机构树"
,
notes
=
"管辖机构树"
)
public
ResponseModel
<
Collection
>
managementUnitTree
(
@RequestParam
(
required
=
false
)
String
orgCode
)
{
Collection
result
=
iregUnitInfoService
.
getManagementUnitTree
(
orgCode
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/EquipmentBizServiceImpl.java
0 → 100644
View file @
0f8c4c2d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @author Administrator
*/
@Service
public
class
EquipmentBizServiceImpl
{
private
final
EquipmentCategoryMapper
equipmentCategoryMapper
;
public
EquipmentBizServiceImpl
(
EquipmentCategoryMapper
equipmentCategoryMapper
)
{
this
.
equipmentCategoryMapper
=
equipmentCategoryMapper
;
}
/**
* 设备字典,通过设备父类code,获得子类
*/
public
List
<
EquipmentCategory
>
getChildren
(
String
code
)
{
LambdaQueryWrapper
<
EquipmentCategory
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
EquipmentCategory:
:
getCode
,
code
);
EquipmentCategory
equipmentCategory
=
equipmentCategoryMapper
.
selectOne
(
wrapper
);
LambdaQueryWrapper
<
EquipmentCategory
>
wrapper2
=
new
LambdaQueryWrapper
<>();
wrapper2
.
eq
(
EquipmentCategory:
:
getParentId
,
equipmentCategory
.
getId
());
List
<
EquipmentCategory
>
equipmentCategories
=
equipmentCategoryMapper
.
selectList
(
wrapper2
);
return
equipmentCategories
;
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/resources/json/company.json
View file @
0f8c4c2d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
"dataConfig"
:
{
"dataConfig"
:
{
"api"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
"httpMethod"
:
"GET"
,
"apiPath"
:
"/
tcm/baseE
nterprise/getInfoByUseCode/map"
,
"apiPath"
:
"/
statistics/dp/biz-e
nterprise/getInfoByUseCode/map"
,
"params"
:
{
"params"
:
{
"useCode"
:
"{useUnitCode}"
"useCode"
:
"{useUnitCode}"
}
}
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
"dataConfig"
:
{
"dataConfig"
:
{
"api"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
"httpMethod"
:
"GET"
,
"apiPath"
:
"/
tcm/baseE
nterprise/getInfoByUseCode/map"
,
"apiPath"
:
"/
statistics/dp/biz-e
nterprise/getInfoByUseCode/map"
,
"params"
:
{
"params"
:
{
"useCode"
:
"{useUnitCode}"
"useCode"
:
"{useUnitCode}"
}
}
...
...
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