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
ce7b5517
Commit
ce7b5517
authored
Aug 31, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug ,联动单位树信息和谈话记录中谈话时间中数据库表更改,以及重点部位数量的统计
parent
4c3814ea
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
19 deletions
+69
-19
DataDictionaryController.java
.../boot/biz/common/controller/DataDictionaryController.java
+27
-17
DataDictionaryMapper.java
...amos/boot/biz/common/dao/mapper/DataDictionaryMapper.java
+5
-0
DataDictionaryMapper.xml
...common/src/main/resources/mapper/DataDictionaryMapper.xml
+22
-0
CompanyDto.java
...m/yeejoin/amos/boot/module/common/api/dto/CompanyDto.java
+3
-0
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+6
-2
jcs-1.0.0.0.xml
...ystem-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
+6
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/controller/DataDictionaryController.java
View file @
ce7b5517
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
controller
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
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
;
...
@@ -15,11 +21,12 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
...
@@ -15,11 +21,12 @@ 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
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
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.BaseControll
er
;
import
com.yeejoin.amos.boot.biz.common.
dao.mapper.DataDictionaryMapp
er
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
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.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
...
@@ -28,10 +35,10 @@ import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
...
@@ -28,10 +35,10 @@ import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
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.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
/**
/**
* 数据字典
* 数据字典
*
*
...
@@ -51,6 +58,9 @@ public class DataDictionaryController extends BaseController {
...
@@ -51,6 +58,9 @@ public class DataDictionaryController extends BaseController {
@Value
(
"${redis.cache.failure.time}"
)
@Value
(
"${redis.cache.failure.time}"
)
private
long
time
;
private
long
time
;
@Autowired
DataDictionaryMapper
dataDictionaryMapper
;
/**
/**
* 新增数据字典
* 新增数据字典
*
*
...
@@ -76,7 +86,6 @@ public class DataDictionaryController extends BaseController {
...
@@ -76,7 +86,6 @@ public class DataDictionaryController extends BaseController {
return
iDataDictionaryService
.
removeById
(
id
);
return
iDataDictionaryService
.
removeById
(
id
);
}
}
/**
/**
* 修改数据字典
* 修改数据字典
*
*
...
@@ -89,7 +98,6 @@ public class DataDictionaryController extends BaseController {
...
@@ -89,7 +98,6 @@ public class DataDictionaryController extends BaseController {
return
iDataDictionaryService
.
updateById
(
dataDictionary
);
return
iDataDictionaryService
.
updateById
(
dataDictionary
);
}
}
/**
/**
* 根据id查询
* 根据id查询
*
*
...
@@ -103,7 +111,6 @@ public class DataDictionaryController extends BaseController {
...
@@ -103,7 +111,6 @@ public class DataDictionaryController extends BaseController {
return
iDataDictionaryService
.
getById
(
id
);
return
iDataDictionaryService
.
getById
(
id
);
}
}
/**
/**
* 列表分页查询
* 列表分页查询
*
*
...
@@ -166,8 +173,8 @@ public class DataDictionaryController extends BaseController {
...
@@ -166,8 +173,8 @@ public class DataDictionaryController extends BaseController {
return
ResponseHelper
.
buildResponse
(
obj
);
return
ResponseHelper
.
buildResponse
(
obj
);
}
else
{
}
else
{
Collection
<
DataDictionary
>
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
Collection
<
DataDictionary
>
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
,
"getParent"
,
null
);
"getParent"
,
null
);
redisUtils
.
set
(
RedisKey
.
DATA_DICTIONARY_CODE
+
type
,
JSON
.
toJSON
(
menus
),
time
);
redisUtils
.
set
(
RedisKey
.
DATA_DICTIONARY_CODE
+
type
,
JSON
.
toJSON
(
menus
),
time
);
return
ResponseHelper
.
buildResponse
(
menus
);
return
ResponseHelper
.
buildResponse
(
menus
);
}
}
...
@@ -187,8 +194,8 @@ public class DataDictionaryController extends BaseController {
...
@@ -187,8 +194,8 @@ public class DataDictionaryController extends BaseController {
return
ResponseHelper
.
buildResponse
(
obj
);
return
ResponseHelper
.
buildResponse
(
obj
);
}
else
{
}
else
{
Collection
<
DataDictionary
>
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
Collection
<
DataDictionary
>
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
,
"getParent"
,
null
);
"getParent"
,
null
);
redisUtils
.
set
(
RedisKey
.
DATA_DICTIONARY_CODE
+
type
,
JSON
.
toJSON
(
menus
),
time
);
redisUtils
.
set
(
RedisKey
.
DATA_DICTIONARY_CODE
+
type
,
JSON
.
toJSON
(
menus
),
time
);
return
ResponseHelper
.
buildResponse
(
menus
);
return
ResponseHelper
.
buildResponse
(
menus
);
}
}
...
@@ -218,7 +225,6 @@ public class DataDictionaryController extends BaseController {
...
@@ -218,7 +225,6 @@ public class DataDictionaryController extends BaseController {
}
}
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/form/list"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/form/list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据表态类型多个code查询表单数据项"
,
notes
=
"根据表态类型多个code查询表单数据项"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据表态类型多个code查询表单数据项"
,
notes
=
"根据表态类型多个code查询表单数据项"
)
...
@@ -252,15 +258,21 @@ public class DataDictionaryController extends BaseController {
...
@@ -252,15 +258,21 @@ public class DataDictionaryController extends BaseController {
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/dataDictionaryTree"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/dataDictionaryTree"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据字典类型查询字典树"
,
notes
=
"根据字典类型查询字典树"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据字典类型查询字典树"
,
notes
=
"根据字典类型查询字典树"
)
public
ResponseModel
<
Object
>
getDictionaryTree
(
@RequestParam
String
type
,
@RequestParam
String
rootName
)
throws
Exception
{
public
ResponseModel
<
Object
>
getDictionaryTree
(
@RequestParam
String
type
,
@RequestParam
String
rootName
)
throws
Exception
{
QueryWrapper
<
DataDictionary
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
DataDictionary
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"type"
,
type
);
queryWrapper
.
eq
(
"type"
,
type
);
queryWrapper
.
orderByAsc
(
"sort_num"
);
queryWrapper
.
orderByAsc
(
"sort_num"
);
Collection
<
DataDictionary
>
list
=
null
;
if
(
"YJLDDW"
.
equals
(
type
))
{
list
=
dataDictionaryMapper
.
getNoInLinkUnit
();
}
else
{
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
Collection
<
DataDictionary
>
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
}
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
"getParent"
,
,
"getParent"
,
null
);
null
);
// 创建根节点
// 创建根节点
Menu
menu
=
new
Menu
(-
1L
,
rootName
,
-
1L
,
menus
,
0
);
Menu
menu
=
new
Menu
(-
1L
,
rootName
,
-
1L
,
menus
,
0
);
List
<
Menu
>
menuList
=
new
ArrayList
<>();
List
<
Menu
>
menuList
=
new
ArrayList
<>();
...
@@ -269,6 +281,4 @@ public class DataDictionaryController extends BaseController {
...
@@ -269,6 +281,4 @@ public class DataDictionaryController extends BaseController {
return
ResponseHelper
.
buildResponse
(
menuList
);
return
ResponseHelper
.
buildResponse
(
menuList
);
}
}
}
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/dao/mapper/DataDictionaryMapper.java
View file @
ce7b5517
...
@@ -17,4 +17,9 @@ public interface DataDictionaryMapper extends BaseMapper<DataDictionary> {
...
@@ -17,4 +17,9 @@ public interface DataDictionaryMapper extends BaseMapper<DataDictionary> {
* @return
* @return
*/
*/
public
List
<
DataDictionary
>
getDataDictionaryListAndCount
();
public
List
<
DataDictionary
>
getDataDictionaryListAndCount
();
/**
* 获取包含联动单位的联动单位树信息
* @return
*/
public
List
<
DataDictionary
>
getNoInLinkUnit
();
}
}
amos-boot-biz-common/src/main/resources/mapper/DataDictionaryMapper.xml
View file @
ce7b5517
...
@@ -23,4 +23,26 @@ GROUP BY
...
@@ -23,4 +23,26 @@ GROUP BY
</select>
</select>
<select
id =
"getNoInLinkUnit"
resultType=
"com.yeejoin.amos.boot.biz.common.entity.DataDictionary"
>
SELECT
cbb.*
FROM
cb_data_dictionary cbb
LEFT JOIN (
SELECT
emergency_linkage_unit_code,
COUNT(1) count
FROM
cb_linkage_unit
GROUP BY
emergency_linkage_unit_code
) elink ON elink.emergency_linkage_unit_code = cbb.`code`
WHERE
cbb.type = 'YJLDDW'
AND elink.count IS NOT NULL
</select>
</mapper>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/CompanyDto.java
View file @
ce7b5517
...
@@ -38,4 +38,7 @@ public class CompanyDto {
...
@@ -38,4 +38,7 @@ public class CompanyDto {
@ApiModelProperty
(
value
=
"单位名称"
)
@ApiModelProperty
(
value
=
"单位名称"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"重点部位数量"
)
private
int
keySiteNum
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
ce7b5517
...
@@ -220,8 +220,12 @@
...
@@ -220,8 +220,12 @@
a.companyMaleEmployees,
a.companyMaleEmployees,
a.companyFemaleEmployees,
a.companyFemaleEmployees,
a.managementType,
a.managementType,
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance,
FROM important_companys a
case when cks_d.count is null then 0 else cks_d.count end as keySiteNum
FROM important_companys a left join (
SELECT cks.belong_id ,count(cks.belong_id) count from cb_key_site cks GROUP BY cks.belong_id
)cks_d
on a.id=cks_d.belong_id
where a.longitude is not null and a.latitude is not null
where a.longitude is not null and a.latitude is not null
<if
test=
'par.distance!=null'
>
<if
test=
'par.distance!=null'
>
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
<
=
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
<
=
...
...
amos-boot-system-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
View file @
ce7b5517
...
@@ -154,5 +154,11 @@
...
@@ -154,5 +154,11 @@
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"chenhao"
id=
"2021-08-31-chenhao-1"
>
<comment>
modify table cb_firefighters_thought add one columns
</comment>
<sql>
ALTER TABLE `cb_firefighters_thought` modify talking_time datetime COMMENT '谈话时间';
</sql>
</changeSet>
</databaseChangeLog>
</databaseChangeLog>
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