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
55c76fce
Commit
55c76fce
authored
Dec 21, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6
parents
0c02f5e1
6f1fc61c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
128 additions
and
14 deletions
+128
-14
OrganizationMapper.xml
...-jcs-api/src/main/resources/mapper/OrganizationMapper.xml
+6
-5
OrganizationImpl.java
...os/boot/module/jcs/biz/service/impl/OrganizationImpl.java
+15
-0
EmergencyMapper.xml
...ystem-equip/src/main/resources/mapper/EmergencyMapper.xml
+31
-9
jcs-1.0.0.0.xml
...ystem-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
+76
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/OrganizationMapper.xml
View file @
55c76fce
...
...
@@ -62,6 +62,7 @@
co.emergency_team_name AS name
FROM
cb_organization co
WHERE co.is_delete = 0
ORDER BY
co.sort
LIMIT 4
...
...
@@ -69,7 +70,7 @@
</select>
<select
id=
"getOrganizationList"
resultType=
"java.util.Map"
>
SELECT
cou.sequence_nbr
as userId,
ifnull(cou.consultation_nub, 0)
as userId,
ifnull(cou.emergency_team_id, '') as groupId,
ifnull(co.emergency_team_name, '') as emergencyTeamName,
ifnull(cou.member_name, '') as memberName ,
...
...
@@ -80,8 +81,8 @@
FROM
cb_organization co
LEFT JOIN cb_organization_user cou ON co.sequence_nbr = cou.emergency_team_id
where co.biz_org_code like concat(#{bizOrgCode}, '%')
ORDER BY co.sort
where co.biz_org_code like concat(#{bizOrgCode}, '%')
and cou.is_delete = 0
ORDER BY co.sort
, cou.rec_date
</select>
<select
id=
"getOrganizationGroup"
resultType=
"java.util.Map"
>
SELECT
...
...
@@ -105,7 +106,7 @@
FROM
cb_organization co
WHERE
co.biz_org_code LIKE concat( #{bizOrgCode}, '%' )
co.biz_org_code LIKE concat( #{bizOrgCode}, '%' )
and co.is_delete = 0
</select>
<select
id=
"selectOrganizationUserList"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.dto.OrganizationUserExportDto"
>
SELECT
...
...
@@ -116,7 +117,7 @@
cou.consultation_nub
FROM
cb_organization_user cou
where cou.is_delete = 0
</select>
<select
id=
"selectMaxSort"
resultType=
"java.lang.Integer"
>
SELECT IFNULL( MAX(sort),0) FROM cb_organization
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/OrganizationImpl.java
View file @
55c76fce
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrganizationExportDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrganizationUserExportDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Organization
;
...
...
@@ -91,12 +93,25 @@ public class OrganizationImpl extends BaseService<Organization,Organization, Org
@Override
public
Organization
saveOrganization
(
Organization
organization
)
{
LambdaQueryWrapper
<
Organization
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Organization:
:
getEmergencyTeamName
,
organization
.
getEmergencyTeamName
());
List
<
Organization
>
organizations
=
this
.
list
(
wrapper
);
if
(!
CollectionUtils
.
isEmpty
(
organizations
))
{
throw
new
BadRequest
(
"应急小组名称重复!"
);
}
organization
.
setSort
(
organizationMapper
.
selectMaxSort
()
+
1
);
return
this
.
createWithModel
(
organization
);
}
@Override
public
Organization
updateModelById
(
Organization
organization
)
{
LambdaQueryWrapper
<
Organization
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
ne
(
BaseEntity:
:
getSequenceNbr
,
organization
.
getSequenceNbr
());
queryWrapper
.
eq
(
Organization:
:
getEmergencyTeamName
,
organization
.
getEmergencyTeamName
());
List
<
Organization
>
organizations
=
this
.
list
(
queryWrapper
);
if
(!
CollectionUtils
.
isEmpty
(
organizations
))
{
throw
new
BadRequest
(
"应急小组名称重复!"
);
}
return
this
.
updateWithModel
(
organization
);
}
...
...
amos-boot-system-equip/src/main/resources/mapper/EmergencyMapper.xml
View file @
55c76fce
...
...
@@ -108,7 +108,7 @@
and wel.biz_org_code like concat(#{bizOrgCode} , '%')) AS fireAxe,
( SELECT COUNT( 1 ) FROM `wl_equipment_specific` wel WHERE wel.equipment_code LIKE CONCAT( '3911', '%' )
and wel.biz_org_code like concat(#{bizOrgCode} , '%')) AS fireBucket,
( SELECT COUNT( 1 ) FROM `wl_equipment_specific` wel WHERE wel.equipment_code LIKE CONCAT( '
53022
', '%' )
( SELECT COUNT( 1 ) FROM `wl_equipment_specific` wel WHERE wel.equipment_code LIKE CONCAT( '
1106
', '%' )
and wel.biz_org_code like concat(#{bizOrgCode} , '%')) AS respirator
</select>
<select
id=
"selectEmergencyMaterialsDetails"
resultType=
"java.util.Map"
>
...
...
@@ -131,7 +131,7 @@
OR wel.equipment_code LIKE CONCAT( '3910', '%' )
OR wel.equipment_code LIKE CONCAT( '3904', '%' )
OR wel.equipment_code LIKE CONCAT( '3911', '%' )
OR wel.equipment_code LIKE CONCAT( '
53022
', '%' )
OR wel.equipment_code LIKE CONCAT( '
1106
', '%' )
)
AND wel.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%' )
GROUP BY
...
...
@@ -147,7 +147,9 @@
concat( wesi.equipment_index_name, '(是)' )
WHEN 'false' THEN
concat( wesi.equipment_index_name, '(否)' )
END) ELSE wesi.value_label END FROM wl_equipment_specific_index wesi WHERE wesi.equipment_specific_id = temp.id AND wesi.is_alarm = 1
END) ELSE wesi.value_label END FROM wl_equipment_specific_index wesi
LEFT JOIN wl_equipment_index wei on wesi.equipment_index_id = wei.id
WHERE wesi.equipment_specific_id = temp.id AND wei.is_trend = 0
ORDER BY wesi.update_date desc LIMIT 1),'--') AS status,
'--' AS flow
FROM(
...
...
@@ -174,9 +176,13 @@
CASE
WHEN ( temp.nowLevel = '--' ) THEN
'--'
WHEN ( temp.nowLevel
<
temp.minLevel ) THEN
WHEN ( temp.maxLevel = 0 ) THEN
'--'
WHEN ( temp.minLevel = 0 ) THEN
'--'
WHEN ( temp.minLevel - temp.nowLevel > 0 ) THEN
'液位低'
WHEN ( temp.nowLevel
> temp.maxLevel
) THEN
WHEN ( temp.nowLevel
- temp.maxLevel > 0
) THEN
'液位高' ELSE '正常'
END AS status,
CASE
...
...
@@ -324,9 +330,17 @@
CASE
WHEN temp.nowPressure = '--' THEN
'--'
WHEN temp.nowPressure > temp.maxPressure THEN
WHEN temp.maxPressure = '' THEN
'--'
WHEN temp.minPressure = '' THEN
'--'
WHEN ( temp.maxLevel = 0 ) THEN
'--'
WHEN ( temp.minLevel = 0 ) THEN
'--'
WHEN temp.nowPressure - temp.maxPressure > 0 THEN
'压力高'
WHEN temp.
nowPressure
<
temp.minPressure
THEN
WHEN temp.
minPressure - temp.nowPressure > 0
THEN
'压力低' ELSE '正常'
END AS status,
1 AS type
...
...
@@ -357,9 +371,17 @@
CASE
WHEN temp.nowFlow = '--' THEN
'--'
WHEN temp.nowFlow > temp.maxFlow THEN
WHEN temp.maxFlow = '' THEN
'--'
WHEN temp.minFlow = '' THEN
'--'
WHEN ( temp.maxLevel = 0 ) THEN
'--'
WHEN ( temp.minLevel = 0 ) THEN
'--'
WHEN temp.nowFlow - temp.maxFlow > 0 THEN
'流量高'
WHEN temp.
nowFlow
<
temp.minFlow
THEN
WHEN temp.
minFlow - temp.nowFlow > 0
THEN
'流量低' ELSE '正常'
END AS status,
2 AS type
...
...
amos-boot-system-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
View file @
55c76fce
...
...
@@ -3602,5 +3602,81 @@
REPLACE INTO `cb_data_dictionary`(`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `extend`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES (1805, '1805', '灭火抢险救援类', 'GWMC', NULL, NULL, NULL, NULL, NULL, NULL, b'0', 25);
</sql>
</changeSet>
<changeSet
author=
"ls"
id=
"20221220-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"cb_organization_user"
/>
</not>
</preConditions>
<comment>
create table cb_organization_user
</comment>
<sql>
DROP TABLE IF EXISTS `cb_organization_user`;
CREATE TABLE `cb_organization_user` (
`sequence_nbr` bigint(0) NOT NULL,
`emergency_team_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '应急小组名称',
`emergency_team_id` bigint(0) NULL DEFAULT NULL COMMENT '应急小组id',
`post_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '岗位名称',
`telephone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电话',
`head_photo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像地址',
`rec_date` datetime(0) NULL DEFAULT NULL COMMENT '新增时间',
`member_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '成员姓名',
`member_name_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '成员id',
`rec_user_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`rec_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`is_delete` bit(1) NULL DEFAULT NULL,
`consultation_nub` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '会商码',
PRIMARY KEY (`sequence_nbr`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
</sql>
</changeSet>
<changeSet
author=
"ls"
id=
"20221220-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"cb_organization"
/>
</not>
</preConditions>
<comment>
create table cb_organization
</comment>
<sql>
DROP TABLE IF EXISTS `cb_organization`;
CREATE TABLE `cb_organization` (
`sequence_nbr` bigint(0) NOT NULL,
`emergency_team_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '应急小组名称',
`biz_org_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属单位名称',
`biz_org_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属单位code',
`group_leader` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组长',
`group_leader_tel` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组长电话',
`deputy_group_leader` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '副组长',
`deputy_group_leader_tel` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '副组长电话',
`duty` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '职责',
`photo_urls` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '照片地址',
`enclosure` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件',
`parent_id` bigint(0) NULL DEFAULT 0 COMMENT '父id',
`sort` int(0) NULL DEFAULT NULL COMMENT '排序',
`rec_date` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`group_leader_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组长id',
`deputy_group_leader_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '副组长id',
`rec_user_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`rec_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`is_delete` bit(1) NULL DEFAULT NULL,
PRIMARY KEY (`sequence_nbr`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
</sql>
</changeSet>
<changeSet
author=
"ls"
id=
"20221220-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"cb_data_dictionary"
/>
<not>
<primaryKeyExists
primaryKeyName=
"sequence_nbr"
tableName=
"cb_data_dictionary"
/>
</not>
</preConditions>
<comment>
cb_data_dictionary 添加值班岗位
</comment>
<sql>
replace INTO cb_data_dictionary (`sequence_nbr`, `code`, `name`, `type`, `type_desc`, `extend`, `parent`, `rec_user_name`, `rec_user_id`, `rec_date`, `is_delete`, `sort_num`) VALUES ('1676', '1676', '当值值长', 'DUTY_POST_TYPE', NULL, NULL, NULL, NULL, NULL, NULL, b'0', '1');
</sql>
</changeSet>
</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