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