Commit a548c586 authored by kongfm's avatar kongfm

Merge branch 'developer' of http://e7ypyu8.nat.ipyingshe.com/moa/amos-boot-biz into developer

parents 88c3a58b 19ffc95c
......@@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.cloud.openfeign.support.SpringEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.context.request.RequestContextListener;
import feign.codec.Encoder;
import feign.form.spring.SpringFormEncoder;
......@@ -25,4 +26,12 @@ public class MultipartSupportConfig {
public Encoder feignFormEncoder() {
return new SpringFormEncoder(new SpringEncoder(messageConverters));
}
/**
* 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
* @return
*/
@Bean
public RequestContextListener requestInterceptor() {
return new RequestContextListener();
}
}
......@@ -50,7 +50,7 @@ public class Swagger2Config {
.apiInfo(apiInfo())
.select()
//此包路径下的类,才生成接口文档
.apis(RequestHandlerSelectors.basePackage("com.yeejoin.amos"))
.apis(RequestHandlerSelectors.basePackage("com.yeejoin"))
//加了ApiOperation注解的类,才生成接口文档
.apis(RequestHandlerSelectors.withClassAnnotation(RestController.class))
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
......
......@@ -115,4 +115,10 @@ public class FireEquipmentSignalLogDto extends BaseDto {
@ApiModelProperty(value = "负责人联系电话")
private String chargePersonPhone;
/**
* 3维页面访问地址
*/
@ApiModelProperty(value = "3维页面访问地址")
private String view3dUrl;
}
......@@ -80,4 +80,10 @@ public class FireStationInfoDto extends BaseDto {
@ApiModelProperty(value = "现存隐患")
private Long existDangerNumber;
/**
* 3维页面访问地址
*/
@ApiModelProperty(value = "3维页面访问地址")
private String view3dUrl;
}
......@@ -129,4 +129,10 @@ public class FireStationInfo extends BaseEntity {
*/
@TableField("fire_captain_phone")
private String fireCaptainPhone;
/**
* 3维页面访问地址
*/
@TableField("view3d_url")
private String view3dUrl;
}
......@@ -32,7 +32,8 @@
a.system_names,
s.station_charge_person,
s.charge_person_phone,
a.fire_building_mrid
a.fire_building_mrid,
s.view3d_url
from
asf_fire_equipment_signal_log a,
asf_fire_station_info s
......
......@@ -32,4 +32,11 @@ public class FireTeamListDto {
@ApiModelProperty(value = "树节点子节点id集合")
private List<String> nodeIds;
@ApiModelProperty(value = "地址")
private String address;
@ApiModelProperty(value = "所属单位")
private String company;
}
......@@ -27,6 +27,7 @@ public interface FireStationMapper extends BaseMapper<FireStation> {
+ "<if test='par.name!=null'> and a.name like CONCAT('%',#{par.name},'%') </if>"
+ "<if test='par.bizCompanyId!=null'> and a.biz_company_id = #{par.bizCompanyId} </if>"
+ "<if test='par.bizCompanyCode!=null'> and a.biz_company_code like CONCAT('',#{par.bizCompanyCode},'%') </if>"
+ "<if test='par.address!=null'> and a.address like CONCAT('',#{par.address},'%') </if>"
+" order by a.rec_date desc limit #{pageNum},#{pageSize}"
+ "</script>")
List<FireStationDto>getFireStation(@Param("pageNum")int pageNum,@Param("pageSize")int pageSize,@Param("par")FireStationDto par);
......@@ -35,6 +36,7 @@ public interface FireStationMapper extends BaseMapper<FireStation> {
+ "<if test='par.name!=null'> and cb_fire_station.name like CONCAT('%',#{par.name},'%') </if>"
+ "<if test='par.bizCompanyId!=null'> and cb_fire_station.biz_company_id = #{par.bizCompanyId} </if>"
+ "<if test='par.bizCompanyCode!=null'> and cb_fire_station.biz_company_code like CONCAT('',#{par.bizCompanyCode},'%') </if>"
+ "<if test='par.address!=null'> and cb_fire_station.address like CONCAT('',#{par.address},'%') </if>"
+ "</script>")
Map<String, Long> getFireStationCount(@Param("par")FireStationDto par);
......
......@@ -3,6 +3,9 @@ package com.yeejoin.amos.boot.module.common.api.service;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto;
import java.util.List;
import java.util.Map;
/**
* @author DELL
*/
......@@ -30,4 +33,5 @@ public interface IDutyCarService extends IDutyCommonService {
*/
JSONObject isFireCarDriver();
int getDutyCarCount(Long carId);
List<Map<String, Object>> getDutyCaruser(Long carId);
}
......@@ -144,6 +144,15 @@ select * from (
cd.FIELD_VALUE
END
) AS #{equipmentId},
MAX(
CASE
WHEN cd.FIELD_CODE = 'userName' THEN
cd.FIELD_VALUE
END
) AS 'userName',
MAX(
CASE
WHEN cd.FIELD_CODE = #{equipmentName} THEN
......
......@@ -44,7 +44,9 @@
<if test='par.parent != null'>and a.parent = #{par.parent}</if>
<if test='par.typeCode != null'>and a.type_code = #{par.typeCode}</if>
<if test='par.companyCode != null'>and a.company_code = #{par.companyCode}</if>
<if test='par.company != null and par.company != -1'>and a.company = #{par.company}</if>
<if test='par.name != null'>and a.name like concat('%', #{par.name}, '%')</if>
<if test='par.address != null'>and a.address like concat('%', #{par.address}, '%')</if>
<if test='par.nodeType != null and par.nodeType == "1" and par.nodeIds != null'>
and a.company in
<foreach collection="par.nodeIds" separator="," open="(" item="nodeId" close=")">
......
......@@ -24,6 +24,7 @@
<if test='par.areasExpertise!=null'>and b.areas_expertise_code= #{par.areasExpertise}</if>
<if test='par.name!=null'>and a.name like concat ('%',#{par.name},'%')</if>
<if test='par.state!=null'>and a.state_code= #{par.state}</if>
<if test='par.company!=null and par.company!= -1'>and a.company= #{par.company}</if>
<if test='par.fireTeamId!=null'>and a.fire_team_id= #{par.fireTeamId}</if>
<if test='par.jobTitle!=null'>and a.job_title_code =#{par.jobTitle}</if>
<if
......@@ -43,6 +44,7 @@
<if test='par.name!=null'>and a.name like concat ('%',#{par.name},'%')</if>
<if test='par.state!=null'>and a.state_code= #{par.state}</if>
<if test='par.fireTeamId!=null'>and a.fire_team_id= #{par.fireTeamId}</if>
<if test='par.company!=null and par.company!= -1'>and a.company= #{par.company}</if>
<if test='par.jobTitle!=null'>and a.job_title_code =#{par.jobTitle}</if>
<if
test='par.areasExpertiseCode!=null and par.areasExpertiseCode!="0"'>and b.areas_expertise_code
......
......@@ -140,6 +140,9 @@
<if test="map.amosOrgCode != null and map.amosOrgCode != '-1'">
AND u.amos_org_code like concat('%',#{map.amosOrgCode}, '%')
</if>
<if test="map.company != null and map.company != '-1'">
AND u.parent_id = #{company}
</if>
GROUP BY
u.sequence_nbr ,
u.biz_org_name ,
......
......@@ -147,11 +147,11 @@
<if test="alertStatus!= null ">
and a.alert_status = #{alertStatus}
</if>
<if test="startTime!= null and endTime != null">
<if test="startTime!= null and endTime != null and startTime!= '' and endTime != ''">
and a.call_time between #{startTime} and #{endTime}
</if>
<if test="alertTypeCode!= null ">
and a.alarm_type_code = #{alertTypeCode}
<if test="alertTypeCode!= null and alertTypeCode!= '' ">
and a.alert_type_code = #{alertTypeCode}
</if>
<if test="alertSourceCode!= null ">
and a.alert_source_code = #{alertSourceCode}
......@@ -177,10 +177,7 @@
<select id="selectAllCount" resultType="int">
SELECT
sum(b.num)
FROM
(SELECT
count(distinct a.sequence_nbr) as num
count(a.sequence_nbr) as num
FROM
jc_alert_called a
<if test="isFatherAlert!= null and isFatherAlert == 'true' ">
......@@ -190,23 +187,23 @@
<if test="alertStatus!= null ">
and a.alert_status = #{alertStatus}
</if>
<if test="startTime!= null and endTime != null">
<if test="startTime!= null and endTime != null and startTime!= '' and endTime != ''">
and a.call_time between #{startTime} and #{endTime}
</if>
<if test="alertTypeCode!= null ">
<if test="alertTypeCode!= null and alertTypeCode!= '' ">
and a.alarm_type_code = #{alertTypeCode}
</if>
<if test="alertSourceCode!= null ">
and a.alert_source_code = #{alertSourceCode}
</if>
<if test="systemSourceCode!= null ">
and a.system_source_code = #{systemSourceCode}
and a.system_source_code in (${systemSourceCode})
</if>
<if test="isFatherAlert!= null and isFatherAlert == 'true' ">
and j.alert_called_id = a.sequence_nbr
GROUP BY a.sequence_nbr
</if>
</where>) b
</where>
</select>
......
......@@ -1104,6 +1104,7 @@ public class CommandController extends BaseController {
if (e.get("carState").equals("在位")) {
e.put("carState", FireCarStatusEnum.执勤.getName());
}
String sequenceNbr = e.get("sequenceNbr").toString();
//同步力量调派车辆任务状态
alertFormValue.stream().forEach(v -> {
......@@ -1470,12 +1471,21 @@ public class CommandController extends BaseController {
powerTransferCompanyResources = powerTransferCompanyResourcesService.getByAlertCalledIdCarId(alertCalledId, carid);
// 随车人员
List<PowerData> powerDataOne = powerTransferMapper.getPowerDataOne(carid);
if(!ValidationUtil.isEmpty(powerDataOne)) {
// List<PowerData> powerDataOne = powerTransferMapper.getPowerDataOne(carid);
List<Map<String, Object>> equipmentList = iDutyCarService.getDutyCaruser(carid);
if(!ValidationUtil.isEmpty(equipmentList)) {
String str = "";
String newStr = "";
for(int i = 0; i < powerDataOne.size(); i++ ) {
newStr = str.concat(powerDataOne.get(i).getPostTypeName()).concat(":").concat(powerDataOne.get(i).getUser());
for(int i = 0; i < equipmentList.size(); i++ ) {
if(i==equipmentList.size()-1){
newStr = str.concat(equipmentList.get(i).get("userName")+"");
}else{
newStr = str.concat(equipmentList.get(i).get("userName")+",");
}
}
powerTransferCompanyResources.setPw(newStr);
} else {
......
......@@ -238,4 +238,16 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
return count;
}
@Override
public List<Map<String, Object>> getDutyCaruser(Long carId) {
List<Map<String, Object>> equipmentList = dutyPersonShiftMapper.getEquipmentForSpecifyDate(DateUtils.getDateNowShortStr(),
this.getGroupCode(), "carId", "carName", "teamName","");
equipmentList = equipmentList.stream().filter((e) ->
e.containsKey("carId") && e.get("carId").equals(Long.toString(carId))
).collect(Collectors.toList());
return equipmentList;
}
}
......@@ -249,7 +249,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
JSONObject jsonObject = unitMap.getJSONObject("map");
confirmAlamVo.setUnitInvolvedId(equipmentSpecific.getAgencyId());
confirmAlamVo.setUnitInvolvedName(unitMap.getString("bizOrgName"));
confirmAlamVo.setAddress(ent.getAlarmPlace());
confirmAlamVo.setAddress(jsonObject.getString("companyLocation"));
confirmAlamVo.setLongitude(jsonObject.getDouble("longitude"));
confirmAlamVo.setLatitude(jsonObject.getDouble("latitude"));
}
......
package com.yeejoin.amos.fas.business.feign;
import feign.codec.Encoder;
import feign.form.spring.SpringFormEncoder;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.cloud.openfeign.support.SpringEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.context.request.RequestContextListener;
/**
* @Author: xinglei
* @Description:
* @Date: 2020/3/30 16:26
*/
@Configuration
public class MultipartSupportConfig {
@Autowired
private ObjectFactory<HttpMessageConverters> messageConverters;
@Bean
public Encoder feignFormEncoder() {
return new SpringFormEncoder(new SpringEncoder(messageConverters));
}
/**
* 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
* @return
*/
@Bean
public RequestContextListener requestInterceptor() {
return new RequestContextListener();
}
}
//package com.yeejoin.amos.fas.business.feign;
//
//import feign.codec.Encoder;
//import feign.form.spring.SpringFormEncoder;
//import org.springframework.beans.factory.ObjectFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
//import org.springframework.cloud.openfeign.support.SpringEncoder;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.context.request.RequestContextListener;
//
///**
// * @Author: xinglei
// * @Description:
// * @Date: 2020/3/30 16:26
// */
//@Configuration
//public class MultipartSupportConfig {
//
// @Autowired
// private ObjectFactory<HttpMessageConverters> messageConverters;
//
// @Bean
// public Encoder feignFormEncoder() {
// return new SpringFormEncoder(new SpringEncoder(messageConverters));
// }
//
// /**
// * 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
// * @return
// */
// @Bean
// public RequestContextListener requestInterceptor() {
// return new RequestContextListener();
// }
//}
......@@ -6,6 +6,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig;
@FeignClient(name = "${outSystem.fegin.name}", configuration = {MultipartSupportConfig.class})
public interface OutTokenLoginFeign {
......
package com.yeejoin.amos.fas.business.feign;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import java.util.Map;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Map;
import com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
@FeignClient(name = "${privilege.fegin.name}", configuration = {MultipartSupportConfig.class})
public interface PrivilegeFeign {
......
package com.yeejoin.amos.fas.business.feign;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig;
import com.yeejoin.amos.fas.business.jpush.PushMsgParam;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import org.springframework.cloud.openfeign.FeignClient;
/**
......
package com.yeejoin.amos.maintenance.feign;
import feign.codec.Encoder;
import feign.form.spring.SpringFormEncoder;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.cloud.openfeign.support.SpringEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.context.request.RequestContextListener;
/**
* @Author: xinglei
* @Description:
* @Date: 2020/3/30 16:26
*/
@Configuration
public class MultipartSupportConfig {
@Autowired
private ObjectFactory<HttpMessageConverters> messageConverters;
@Bean
public Encoder feignFormEncoder() {
return new SpringFormEncoder(new SpringEncoder(messageConverters));
}
/**
* 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
* @return
*/
@Bean
public RequestContextListener requestInterceptor() {
return new RequestContextListener();
}
}
//package com.yeejoin.amos.maintenance.feign;
//
//import feign.codec.Encoder;
//import feign.form.spring.SpringFormEncoder;
//import org.springframework.beans.factory.ObjectFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
//import org.springframework.cloud.openfeign.support.SpringEncoder;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.context.request.RequestContextListener;
//
///**
// * @Author: xinglei
// * @Description:
// * @Date: 2020/3/30 16:26
// */
//@Configuration
//public class MultipartSupportConfig {
//
// @Autowired
// private ObjectFactory<HttpMessageConverters> messageConverters;
//
// @Bean
// public Encoder feignFormEncoder() {
// return new SpringFormEncoder(new SpringEncoder(messageConverters));
// }
//
// /**
// * 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
// * @return
// */
// @Bean
// public RequestContextListener requestInterceptor() {
// return new RequestContextListener();
// }
//}
package com.yeejoin.amos.maintenance.feign;
import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig;
import com.yeejoin.amos.maintenance.business.param.PushMsgParam;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.cloud.openfeign.FeignClient;
import com.yeejoin.amos.maintenance.business.util.CommonResponse;
......
......@@ -8,17 +8,21 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
import com.yeejoin.amos.boot.biz.common.utils.oConvertUtils;
@SpringBootApplication
@EnableTransactionManagement
@EnableConfigurationProperties
@EnableDiscoveryClient
@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*",
......
......@@ -219,34 +219,39 @@
</if>
<if test="id == null">
union all
select
'component' as template,
true as openStatus,
if(sou.id is null,0,1) as isBinding,
if(vid.code is null,vid.name,concat(vid.name,'(',vid.code,')')) as displayName,
'{\"width\": 42, \"height\": 42}'as initStyle,
'CommonEquip' as componentName,
vid.id as sequenceNbr,
'equipment' as componentKey,
'video' as `key`,
img as imgPath,
vid.code as equipCode,
vis.source_id as parentId,
vid.id as equipId,
vid.code as categoryCode,
vid.name as equipName,
'' as equipSyetemId,
'' as iotCode,
'1000000000000000'as groupId,
'监控摄像' as groupName,
url as ip ,
SELECT
'component' AS template,
TRUE AS openStatus,
IF
(
( SELECT ss.id FROM wl_source_scene ss WHERE ss.video_in_scene LIKE CONCAT( '%', vid.id, '%' ) ) IS NULL,
0,
1
) AS isBinding,
IF
( vid.CODE IS NULL, vid.NAME, concat( vid.NAME, '(', vid.CODE, ')' ) ) AS displayName,
'{\"width\": 42, \"height\": 42}' AS initStyle,
'CommonEquip' AS componentName,
vid.id AS sequenceNbr,
'equipment' AS componentKey,
'video' AS `key`,
img AS imgPath,
vid.CODE AS equipCode,
vis.source_id AS parentId,
vid.id AS equipId,
vid.CODE AS categoryCode,
vid.NAME AS equipName,
'' AS equipSyetemId,
'' AS iotCode,
'1000000000000000' AS groupId,
'监控摄像' AS groupName,
url AS ip,
token,
stru.full_name as address
from
wl_video as vid
join wl_video_source as vis on vid.id = vis.video_id
join wl_source_scene as sou on sou.video_in_scene like CONCAT('%',vid.id ,'%' )
join wl_warehouse_structure as stru on stru.id = sou.source_id
stru.full_name AS address
FROM
wl_video AS vid
JOIN wl_video_source AS vis ON vid.id = vis.video_id
JOIN wl_warehouse_structure AS stru ON stru.id = vis.source_id
</if>
</select>
<select id="get3dPointData" resultType="com.yeejoin.equipmanage.common.entity.vo.PointTreeVo">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment