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
462f8b41
Commit
462f8b41
authored
Aug 24, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug 2584
parent
ec16f79c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
25 deletions
+53
-25
LinkageUnitMapper.xml
...ommon-api/src/main/resources/mapper/LinkageUnitMapper.xml
+49
-23
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+4
-2
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/LinkageUnitMapper.xml
View file @
462f8b41
...
...
@@ -45,8 +45,17 @@
a.latitude,
a.longitude,
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
AS distance
FROM cb_linkage_unit a
AS distance,
case when csps.person_number is null then 0 else
csps.person_number end as userNum,
case when cre.vehicle_number is null then 0 else cre.vehicle_number end as
carNum
FROM
cb_linkage_unit a
LEFT JOIN cb_special_position_staff csps ON a.sequence_nbr =
csps.company_id
LEFT JOIN cb_rescue_equipment cre on a.sequence_nbr = cre.company_id
where a.longitude is not null and
a.latitude is not null
<if
test=
'par.distance!=null'
>
...
...
@@ -87,28 +96,38 @@
emergency_linkage_unit_code
</select>
<select
id=
"exportToExcel"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto"
>
<select
id=
"exportToExcel"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto"
>
select
a.unit_name unitName,
a.linkage_unit_type linkageUnitType,
a.linkage_unit_type
linkageUnitType,
a.address ,
a.latitude,
a.longitude,
a.agreement_start_date agreementStartDate,
a.agreement_end_date agreementEndDate,
a.agreement_end_date
agreementEndDate,
a.contact_user contactUser,
a.contact_phone contactPhone,
a.contact_phone
contactPhone,
b.*
from cb_linkage_unit a LEFT JOIN
(SELECT
m.instance_id,
max(case m.field_code when 'emergencyServiceContent' then m.field_value end) emergencyServiceContent,
max(case m.field_code when 'fireRescueCapability' then m.field_value end) fireRescueCapability,
max(case m.field_code when 'responsibilitiesSituation' then m.field_value end) responsibilitiesSituation,
max(case m.field_code when 'unitSituation' then m.field_value end) unitSituation
FROM cb_dynamic_form_instance m GROUP BY m.instance_id) b
max(case m.field_code when 'emergencyServiceContent' then
m.field_value end) emergencyServiceContent,
max(case m.field_code when
'fireRescueCapability' then m.field_value end) fireRescueCapability,
max(case m.field_code when 'responsibilitiesSituation' then
m.field_value end) responsibilitiesSituation,
max(case m.field_code
when 'unitSituation' then m.field_value end) unitSituation
FROM
cb_dynamic_form_instance m GROUP BY m.instance_id) b
on b.instance_id=a.instance_id where a.unit_name is not null
on
b.instance_id=a.instance_id where a.unit_name is not null
</select>
...
...
@@ -120,13 +139,18 @@
clu.unit_code AS unitCode,
clu.parent_id AS parentId,
clu.linkage_unit_type AS linkageUnitType,
clu.linkage_unit_type_code AS linkageUnitTypeCode,
clu.administrative_divisions AS administrativeDivisions,
clu.administrative_divisions_code AS administrativeDivisionsCode,
clu.linkage_unit_type_code AS
linkageUnitTypeCode,
clu.administrative_divisions AS
administrativeDivisions,
clu.administrative_divisions_code AS
administrativeDivisionsCode,
clu.address AS address,
clu.longitude AS longitude,
clu.longitude AS
longitude,
clu.latitude AS latitude,
clu.agreement_start_date AS agreementStartDate,
clu.agreement_start_date AS
agreementStartDate,
clu.agreement_end_date AS agreementEndDate,
clu.emergency_linkage_unit AS emergencyLinkageUnit,
clu.emergency_linkage_unit_code AS emergencyLinkageUnitCode,
...
...
@@ -157,14 +181,16 @@
FROM
cb_linkage_unit clu
WHERE clu.is_delete=0
<if
test=
"unitName != null and unitName != ''"
>
AND clu.unit_name LIKE concat(#{unitName}, '%')
<if
test=
"unitName != null and unitName != ''"
>
AND clu.unit_name LIKE concat(#{unitName}, '%')
</if>
<if
test=
"linkageUnitTypeCode != null and linkageUnitTypeCode != ''"
>
AND clu.linkage_unit_type_code =#{linkageUnitTypeCode}
<if
test=
"linkageUnitTypeCode != null and linkageUnitTypeCode != ''"
>
AND clu.linkage_unit_type_code =#{linkageUnitTypeCode}
</if>
<if
test=
"emergencyLinkageUnitCode != null and emergencyLinkageUnitCode != ''"
>
AND clu.emergency_linkage_unit_code =#{emergencyLinkageUnitCode}
<if
test=
"emergencyLinkageUnitCode != null and emergencyLinkageUnitCode != ''"
>
AND clu.emergency_linkage_unit_code =#{emergencyLinkageUnitCode}
</if>
</select>
</mapper>
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
462f8b41
...
...
@@ -422,8 +422,10 @@ public class CommandController extends BaseController {
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/SY"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询水源"
,
notes
=
"根据id查询水源"
)
public
ResponseModel
<
WaterResourceDto
>
selectOne
(
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
iWaterResourceService
.
selectBySequenceNbr
(
id
));
public
ResponseModel
<
JSONObject
>
selectOne
(
Long
id
)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
iWaterResourceService
.
selectBySequenceNbr
(
id
)));
jsonObject
.
remove
(
"managementUnit"
);
return
ResponseHelper
.
buildResponse
(
jsonObject
);
}
...
...
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