Commit 128443da authored by helinlin's avatar helinlin

Merge remote-tracking branch 'origin/developer' into developer

parents 002e6efd 2606a927
...@@ -89,11 +89,11 @@ public class FireEquipmentSignalLogDto extends BaseDto { ...@@ -89,11 +89,11 @@ public class FireEquipmentSignalLogDto extends BaseDto {
@ApiModelProperty(value = "纬度") @ApiModelProperty(value = "纬度")
private String lat; private String lat;
@ApiModelProperty(value = "换流站经度") @ApiModelProperty(value = "位置经度")
private String stationLng; private String sourceLng;
@ApiModelProperty(value = "换流站纬度") @ApiModelProperty(value = "位置纬度")
private String stationLat; private String sourceLat;
@ApiModelProperty(value = "告警日期(冗余查询,为create_date的日期部分,如:2021-11-15") @ApiModelProperty(value = "告警日期(冗余查询,为create_date的日期部分,如:2021-11-15")
private String signalReportDate; private String signalReportDate;
......
...@@ -65,10 +65,10 @@ public class FireLatentDangerDto extends BaseDto { ...@@ -65,10 +65,10 @@ public class FireLatentDangerDto extends BaseDto {
@ApiModelProperty(value = "纬度") @ApiModelProperty(value = "纬度")
private String lat; private String lat;
@ApiModelProperty(value = "换流站经度") @ApiModelProperty(value ="隐患经度")
private String stationLng; private String sourceLng;
@ApiModelProperty(value = "换流站纬度") @ApiModelProperty(value = "隐患纬度")
private String stationLat; private String sourceLat;
} }
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
a.signal_type_name, a.signal_type_name,
a.create_date, a.create_date,
s.name as station_name, s.name as station_name,
a.station_code,
a.location, a.location,
<choose> <choose>
<when test="stationCode != null and stationCode != ''"> <when test="stationCode != null and stationCode != ''">
...@@ -24,8 +23,9 @@ ...@@ -24,8 +23,9 @@
s.lat, s.lat,
</otherwise> </otherwise>
</choose> </choose>
s.lat as stationLat, a.station_code,
s.lng as stationLng a.lat as sourceLat,
a.lng as sourceLng
from from
asf_fire_equipment_signal_log a, asf_fire_equipment_signal_log a,
asf_fire_station_info s asf_fire_station_info s
...@@ -44,6 +44,9 @@ ...@@ -44,6 +44,9 @@
<if test="endDate != null and endDate != ''"> <if test="endDate != null and endDate != ''">
and DATEDIFF(a.create_date,#{endDate}) <![CDATA[<=]]> 0 and DATEDIFF(a.create_date,#{endDate}) <![CDATA[<=]]> 0
</if> </if>
<if test="sourceId != null and sourceId != ''">
and a.id = #{sourceId}
</if>
order by a.create_date desc order by a.create_date desc
<if test="top != null"> <if test="top != null">
limit ${top} limit ${top}
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
s.lat, s.lat,
</otherwise> </otherwise>
</choose> </choose>
s.lng as stationLng, d.lng as sourceLng,
s.lat as stationLat d.lat as sourceLat
from from
asf_fire_latent_danger d, asf_fire_latent_danger d,
asf_fire_station_info s asf_fire_station_info s
......
...@@ -79,6 +79,19 @@ public class MaintenanceCompany extends BaseEntity { ...@@ -79,6 +79,19 @@ public class MaintenanceCompany extends BaseEntity {
@TableField("longitude") @TableField("longitude")
private String longitude; private String longitude;
/**
* amos平台id
*/
@TableField("amos_org_id")
private String amosId;
/**
* amos账户名称
*/
@TableField("amos_org_name")
private String amosName;
/** /**
* 动态表单实例id * 动态表单实例id
*/ */
......
...@@ -4,12 +4,9 @@ import java.util.LinkedHashMap; ...@@ -4,12 +4,9 @@ import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.*;
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 org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...@@ -188,6 +185,7 @@ public interface EquipFeignClient { ...@@ -188,6 +185,7 @@ public interface EquipFeignClient {
*/ */
@RequestMapping(value = "/building/video/page", method = RequestMethod.GET) @RequestMapping(value = "/building/video/page", method = RequestMethod.GET)
ResponseModel<Page<Map<String, Object>>> getVideo( @RequestParam("current") long current, @RequestParam("size") long size, @RequestParam("buildingId") Long buildingId); ResponseModel<Page<Map<String, Object>>> getVideo( @RequestParam("current") long current, @RequestParam("size") long size, @RequestParam("buildingId") Long buildingId);
@RequestMapping(value = "/building/video/page", method = RequestMethod.GET) @RequestMapping(value = "/building/video/page", method = RequestMethod.GET)
ResponseModel<Page<Map<String, Object>>> getVideopag( @RequestParam("current") String current, ResponseModel<Page<Map<String, Object>>> getVideopag( @RequestParam("current") String current,
@RequestParam("size") String size, @RequestParam("size") String size,
...@@ -196,6 +194,24 @@ public interface EquipFeignClient { ...@@ -196,6 +194,24 @@ public interface EquipFeignClient {
@RequestParam("equipmentName") String equipmentName @RequestParam("equipmentName") String equipmentName
); );
@RequestMapping(value = "/monitorView/video/page", method = RequestMethod.GET)
ResponseModel<Page<Map<String, Object>>> queryUncheckedVideoList(
@RequestParam(value = "viewId") Long viewId,
@RequestParam(value = "videoName" ,required =false) String videoName,
@RequestParam(value = "videoCode" ,required =false) String videoCode,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size
);
@RequestMapping(value = "/confirmAlarm/getDetailsById", method = RequestMethod.GET)
public Map<String, Object> getDetailsById(@RequestParam Long alamId, @RequestParam Long equipId, @RequestParam String type, @RequestParam String area) ;
/** /**
* *
*获取视频列表 *获取视频列表
...@@ -327,4 +343,12 @@ public interface EquipFeignClient { ...@@ -327,4 +343,12 @@ public interface EquipFeignClient {
@RequestMapping(value = "/car/all/fusion", method = RequestMethod.GET) @RequestMapping(value = "/car/all/fusion", method = RequestMethod.GET)
ResponseModel<List> getCarFusionList(); ResponseModel<List> getCarFusionList();
@RequestMapping(value = "/equipment/query/classification/", method = RequestMethod.GET)
ResponseModel<List> getClassification();
@RequestMapping(value = "/equipment/list/{typeCode}", method = RequestMethod.GET)
ResponseModel<List> getEquipmentList(@PathVariable("typeCode") String typeCode);
} }
...@@ -83,7 +83,7 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> { ...@@ -83,7 +83,7 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
*/ */
List< OrgUsrExcelDto> exportPersonToExcelByParentId(Long parentId); List< OrgUsrExcelDto> exportPersonToExcelByParentId(Long parentId);
List<OrgUsr> amosIdExist(String amosId); int amosIdExist(String amosId);
void updatelistByParentId(String codex, String code); void updatelistByParentId(String codex, String code);
......
...@@ -342,9 +342,11 @@ AND cft.type_code = ( ...@@ -342,9 +342,11 @@ AND cft.type_code = (
</select> </select>
<select id='queryByCompanyId' resultType="map"> <select id='queryByCompanyId' resultType="map">
select biz_org_name as bizOrgName,sequence_nbr sequenceNbr,field_value as telephone, amosUserId from ( select biz_org_name as bizOrgName,sequence_nbr sequenceNbr,field_value as telephone, amosUserId,companyName from (
select orgUsr.biz_org_name,i.field_value,orgUsr.sequence_nbr,orgUsr.amos_org_id amosUserId select orgUsr.biz_org_name,i.field_value,orgUsr.sequence_nbr,orgUsr.amos_org_id amosUserId, cou1.biz_org_name companyName
from cb_org_usr orgUsr left join cb_dynamic_form_instance i on orgUsr.sequence_nbr = from (select * from cb_org_usr cou where is_delete = 0 ) orgUsr
left join cb_org_usr cou1 on orgUsr.parent_id = cou1.sequence_nbr
left join cb_dynamic_form_instance i on orgUsr.sequence_nbr =
i.instance_id where i.field_code = 'telephone') as d i.instance_id where i.field_code = 'telephone') as d
where d.sequence_nbr in ( where d.sequence_nbr in (
select userId from ( select userId from (
...@@ -367,9 +369,11 @@ AND cft.type_code = ( ...@@ -367,9 +369,11 @@ AND cft.type_code = (
<select id='queryByCompanyNew' resultType="map"> <select id='queryByCompanyNew' resultType="map">
select biz_org_name as bizOrgName,sequence_nbr sequenceNbr,field_value as telephone,amosUserId from ( select biz_org_name as bizOrgName,sequence_nbr sequenceNbr,field_value as telephone, amosUserId,companyName from (
select orgUsr.biz_org_name,i.field_value,orgUsr.sequence_nbr,orgUsr.amos_org_id amosUserId select orgUsr.biz_org_name,i.field_value,orgUsr.sequence_nbr,orgUsr.amos_org_id amosUserId, cou1.biz_org_name companyName
from cb_org_usr orgUsr left join cb_dynamic_form_instance i on orgUsr.sequence_nbr = from (select * from cb_org_usr cou where is_delete = 0 ) orgUsr
left join cb_org_usr cou1 on orgUsr.parent_id = cou1.sequence_nbr
left join cb_dynamic_form_instance i on orgUsr.sequence_nbr =
i.instance_id where i.field_code = 'telephone') as d i.instance_id where i.field_code = 'telephone') as d
where d.sequence_nbr in ( where d.sequence_nbr in (
select userId from ( select userId from (
......
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
mobile_phone as mobilePhone, mobile_phone as mobilePhone,
amos_user_id amosUserId amos_user_id amosUserId
FROM FROM
cb_firefighters firefighters (select * from cb_firefighters fr where is_delete = 0) firefighters
WHERE WHERE
fire_team_id in ( select sequence_nbr from cb_fire_team cft where company in ( fire_team_id in ( select sequence_nbr from cb_fire_team cft where company in (
select sequence_nbr from cb_org_usr cou where biz_org_name = #{name}) ) select sequence_nbr from cb_org_usr cou where biz_org_name = #{name}) )
...@@ -195,7 +195,8 @@ ...@@ -195,7 +195,8 @@
resultType="Map"> resultType="Map">
SELECT SELECT
cff.*, cff.*,
cft. NAME as fireTeamName, case when cft.sequence_nbr is null then "" else cft. sequence_nbr end as fireTeamId,
case when cft.NAME is null then "" else cft. NAME end as fireTeamName,
case when cff.age is null then "" else cff.age end as realAge case when cff.age is null then "" else cff.age end as realAge
from ( from (
SELECT SELECT
......
...@@ -627,12 +627,15 @@ GROUP BY ...@@ -627,12 +627,15 @@ GROUP BY
</select> </select>
<select id="amosIdExist" resultType="com.yeejoin.amos.boot.module.common.api.entity.OrgUsr"> <select id="amosIdExist" resultType="int">
SELECT * select sum(num) from (
FROM cb_org_usr
WHERE is_delete = 0 SELECT count(*) AS num FROM cb_firefighters WHERE amos_user_id = #{amosId} and is_delete = 0
and
amos_org_id = #{amosId} union all SELECT count(*) AS num FROM cb_org_usr WHERE amos_org_id = #{amosId} and is_delete = 0
union all SELECT count(*) AS num FROM cb_maintenance_company WHERE amos_org_id = #{amosId} and is_delete = 0
) AS total;
</select> </select>
...@@ -688,16 +691,16 @@ LEFT JOIN ( ...@@ -688,16 +691,16 @@ LEFT JOIN (
</select> </select>
<select id="queryCompanyId" resultType="map"> <select id="queryCompanyId" resultType="map">
select * from ( select d.*,cbo.biz_org_name companyName from (
select cou.biz_org_name bizOrgName,cou.sequence_nbr sequenceNbr ,cou .parent_id parentId, select cou.biz_org_name bizOrgName,cou.sequence_nbr sequenceNbr ,cou .parent_id parentId,
a.fireManagementPostCode, b.telephone,cou.amos_org_id amosUserId from cb_org_usr cou a.fireManagementPostCode, b.telephone,cou.amos_org_id amosUserId from ( select * from cb_org_usr cou where is_delete = 0 ) cou
left join (select i.instance_id id1 ,if(i.field_code = 'fireManagementPostCode', left join (select i.instance_id id1 ,if(i.field_code = 'fireManagementPostCode',
i.field_value, null) as 'fireManagementPostCode' from cb_dynamic_form_instance i where i.field_code = 'fireManagementPostCode' i.field_value, null) as 'fireManagementPostCode' from cb_dynamic_form_instance i where i.field_code = 'fireManagementPostCode'
and i.field_value_label is not null) a on cou .sequence_nbr = a.id1 and i.field_value_label is not null) a on cou .sequence_nbr = a.id1
left join (select i.instance_id id2,if(i.field_code = 'telephone', left join (select i.instance_id id2,if(i.field_code = 'telephone',
i.field_value, null) as 'telephone' from cb_dynamic_form_instance i where i.field_code = 'telephone' i.field_value, null) as 'telephone' from cb_dynamic_form_instance i where i.field_code = 'telephone'
and i.field_value is not null) b on cou .sequence_nbr = b.id2 and i.field_value is not null) b on cou .sequence_nbr = b.id2
) d where d.parentId in (select sequence_nbr from cb_org_usr cou where biz_org_name = #{bizOrgName}) ) d left join cb_org_usr cbo on cbo.sequence_nbr = d.parentId where d.parentId in (select sequence_nbr from cb_org_usr cou where biz_org_name = #{bizOrgName})
and (d.fireManagementPostCode in and (d.fireManagementPostCode in
<foreach item="item" index="index" collection="codes" open="(" separator="," close=")"> <foreach item="item" index="index" collection="codes" open="(" separator="," close=")">
#{item} #{item}
...@@ -706,16 +709,17 @@ LEFT JOIN ( ...@@ -706,16 +709,17 @@ LEFT JOIN (
</select> </select>
<select id="queryCompanyIdNew" resultType="map"> <select id="queryCompanyIdNew" resultType="map">
select * from ( select d.*,cbo.biz_org_name companyName from (
select cou.biz_org_name bizOrgName,cou.sequence_nbr sequenceNbr ,cou .parent_id parentId, select cou.biz_org_name bizOrgName,cou.sequence_nbr sequenceNbr ,cou .parent_id parentId,
a.administrativePositionCode, b.telephone, cou.amos_org_id amosUserId from cb_org_usr cou a.administrativePositionCode, b.telephone, cou.amos_org_id amosUserId from ( select * from cb_org_usr cou where is_delete = 0 ) cou
left join (select i.instance_id id1 ,if(i.field_code = 'administrativePositionCode', left join (select i.instance_id id1 ,if(i.field_code = 'administrativePositionCode',
i.field_value_label, null) as 'administrativePositionCode' from cb_dynamic_form_instance i where i.field_code = 'administrativePositionCode' i.field_value_label, null) as 'administrativePositionCode' from cb_dynamic_form_instance i where i.field_code = 'administrativePositionCode'
and i.field_value_label is not null) a on cou .sequence_nbr = a.id1 and i.field_value_label is not null) a on cou .sequence_nbr = a.id1
left join (select i.instance_id id2,if(i.field_code = 'telephone', inner join (select i.instance_id id2,if(i.field_code = 'telephone',
i.field_value, null) as 'telephone' from cb_dynamic_form_instance i where i.field_code = 'telephone' i.field_value, null) as 'telephone' from cb_dynamic_form_instance i where i.field_code = 'telephone'
and i.field_value is not null) b on cou .sequence_nbr = b.id2 and i.field_value is not null) b on cou .sequence_nbr = b.id2
) d where d.parentId in (select sequence_nbr from cb_org_usr cou where biz_org_name = #{bizOrgName}) ) d left join cb_org_usr cbo on cbo.sequence_nbr = d.parentId where d.parentId in (select sequence_nbr from cb_org_usr cou where biz_org_name = #{bizOrgName})
</select> </select>
</mapper> </mapper>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</if> </if>
<choose> <choose>
<when test="sortParam != null and sortParam != '' and sortRule != null and sortRule != '' "> <when test="sortParam != null and sortParam != '' and sortRule != null and sortRule != '' ">
ORDER BY ${sortParam} ${sortRule} ORDER BY r.${sortParam} ${sortRule}
</when> </when>
<otherwise> <otherwise>
ORDER BY r.tel_start_time desc ORDER BY r.tel_start_time desc
......
...@@ -91,4 +91,8 @@ public class EquipmentDto extends BaseDto { ...@@ -91,4 +91,8 @@ public class EquipmentDto extends BaseDto {
@ApiModelProperty(value = "附件") @ApiModelProperty(value = "附件")
@TableField(exist = false) @TableField(exist = false)
private Map<String, List<AttachmentDto>> attachments; private Map<String, List<AttachmentDto>> attachments;
@ApiModelProperty(value = "设备参数")
private List<EquipmentIndexDto> equipmentIndex;
} }
...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.service; ...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.service;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentDto; import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentDto;
import java.util.List;
/** /**
* 装备信息表接口类 * 装备信息表接口类
* *
...@@ -28,4 +30,10 @@ public interface IEquipmentService { ...@@ -28,4 +30,10 @@ public interface IEquipmentService {
EquipmentDto updateEquipment(EquipmentDto model); EquipmentDto updateEquipment(EquipmentDto model);
Boolean deleteById(Long sequenceNbr); Boolean deleteById(Long sequenceNbr);
List<Object> getEquipmentType();
List<Object> getEquipmentClass(String typeCode);
EquipmentDto getEquipmentById(Long sequenceNbr);
} }
...@@ -336,6 +336,58 @@ public class CommandController extends BaseController { ...@@ -336,6 +336,58 @@ public class CommandController extends BaseController {
return ResponseHelper.buildResponse(pag); return ResponseHelper.buildResponse(pag);
} }
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "分页查询视图下的视频列表")
@RequestMapping(value = "monitorView/video/page", method = RequestMethod.GET)
public ResponseModel<Page<Map<String, Object>>> queryUncheckedVideoList(
@RequestParam(value = "viewId") Long viewId,
@RequestParam(value = "videoName" ,required =false) String videoName,
@RequestParam(value = "videoCode" ,required =false) String videoCode,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) throws Exception
{
ResponseModel<Page<Map<String, Object>>> data = equipFeignClient.queryUncheckedVideoList(viewId,videoName, videoCode,current,size);
Page<Map<String, Object>> pag = data != null ? data.getResult() : null;
List<Map<String, Object>> records = pag != null ? pag.getRecords() : null;
if (records != null && records.size() > 0) {
for (Map<String, Object> record : records) {
ResponseModel<String> da = videoFeignClient.videoUrlByIndexCode(record.get("code") + "");
String url = da != null ? da.getResult().substring(da.getResult().indexOf("openUrl")) : null;
record.put("url", url);
}
pag.setRecords(records);
}
return ResponseHelper.buildResponse(pag);
}
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@GetMapping(value = "confirmAlarm/getDetailsById")
@ApiOperation(value = "根据id,type查询确警页面相关数据")
public ResponseModel<Map<String, Object>> getDetailsById(@RequestParam Long alamId, @RequestParam Long equipId, @RequestParam String type, @RequestParam String area) {
Map<String, Object> data = equipFeignClient.getDetailsById( alamId, equipId, type, area);
List<Map<String, Object>> records = data != null ? (List<Map<String, Object>>)data.get("video") : null;
if (records != null && records.size() > 0) {
for (Map<String, Object> record : records) {
ResponseModel<String> da = videoFeignClient.videoUrlByIndexCode(record.get("code") + "");
String url = da != null ? da.getResult().substring(da.getResult().indexOf("openUrl")) : null;
record.put("url", url);
}
data.put("video",records);
}
return ResponseHelper.buildResponse(data);
}
/** /**
* 水源列表分页查询 * 水源列表分页查询
* *
...@@ -533,10 +585,15 @@ public class CommandController extends BaseController { ...@@ -533,10 +585,15 @@ public class CommandController extends BaseController {
JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(iWaterResourceService.selectBySequenceNbr(id))); JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(iWaterResourceService.selectBySequenceNbr(id)));
if(!ValidationUtil.isEmpty(jsonObject.get("buildDate"))) { if(!ValidationUtil.isEmpty(jsonObject.get("buildDate"))) {
LocalDateTime dateTime = (LocalDateTime) jsonObject.get("buildDate"); String str = jsonObject.get("buildDate").toString();
Date date = Date.from(dateTime.toInstant(ZoneOffset.of("+8"))); Date date = new Date(Long.parseLong(str));
jsonObject.remove("buildDate");
jsonObject.put("buildDate", DateUtils.convertDateToString(date,DateUtils.DATE_TIME_PATTERN)); jsonObject.put("buildDate", DateUtils.convertDateToString(date,DateUtils.DATE_TIME_PATTERN));
} else {
jsonObject.put("buildDate", "");
}
if(ValidationUtil.isEmpty(jsonObject.get("intakeHeight"))) {
jsonObject.put("intakeHeight", "");
} }
return ResponseHelper.buildResponse(jsonObject); return ResponseHelper.buildResponse(jsonObject);
......
...@@ -134,6 +134,15 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat ...@@ -134,6 +134,15 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
model.setBizCompany(orgUsr.getBizOrgName()); model.setBizCompany(orgUsr.getBizOrgName());
model.setBizCompanyCode(orgUsr.getBizOrgCode()); model.setBizCompanyCode(orgUsr.getBizOrgCode());
} }
// 地址处理
if (model.getAddress() != null) {
JSONObject address = WaterResourceServiceImpl.getLongLatFromAddress(model.getAddress());
model.setAddress(address.getString(BizConstant.ADDRESS));
model.setLongitude(Double.valueOf(address.getString(BizConstant.LONGITUDE)));
model.setLatitude(Double.valueOf(address.getString(BizConstant.LATITUDE)));
}
FireStation entity = this.prepareEntity(model); FireStation entity = this.prepareEntity(model);
this.updateById(entity); this.updateById(entity);
return Bean.toModel(entity, model); return Bean.toModel(entity, model);
......
...@@ -1700,8 +1700,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -1700,8 +1700,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
} }
public Object amosIdExist(String amosId) { public Object amosIdExist(String amosId) {
List<OrgUsr> orgUsrs = orgUsrMapper.amosIdExist(amosId); int num = orgUsrMapper.amosIdExist(amosId);
if (orgUsrs.size() > 0) { if (num > 0) {
return false; return false;
} }
return true; return true;
......
...@@ -31,6 +31,7 @@ import org.apache.commons.lang3.StringUtils; ...@@ -31,6 +31,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.annotation.Condition; import org.typroject.tyboot.core.rdbms.annotation.Condition;
import org.typroject.tyboot.core.rdbms.annotation.Operator; import org.typroject.tyboot.core.rdbms.annotation.Operator;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
...@@ -204,6 +205,28 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate ...@@ -204,6 +205,28 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
WaterResourceDto waterResourceDto = this.queryBySeq(sequenceNbr); WaterResourceDto waterResourceDto = this.queryBySeq(sequenceNbr);
waterResourceDto.setRealityImgList(JSONArray.parseArray(waterResourceDto.getRealityImg(), Object.class)); waterResourceDto.setRealityImgList(JSONArray.parseArray(waterResourceDto.getRealityImg(), Object.class));
waterResourceDto.setOrientationImgList(JSONArray.parseArray(waterResourceDto.getOrientationImg())); waterResourceDto.setOrientationImgList(JSONArray.parseArray(waterResourceDto.getOrientationImg()));
if(ValidationUtil.isEmpty(waterResourceDto.getContactUser())) {
waterResourceDto.setContactUser("");
}
if(ValidationUtil.isEmpty(waterResourceDto.getContactPhone())) {
waterResourceDto.setContactPhone("");
}
if(ValidationUtil.isEmpty(waterResourceDto.getManagementUnit())) {
waterResourceDto.setManagementUnit("");
}
if(ValidationUtil.isEmpty(waterResourceDto.getSection())) {
waterResourceDto.setSection("");
}
if(ValidationUtil.isEmpty(waterResourceDto.getWaterSupplyName())) {
waterResourceDto.setWaterSupplyName("");
}
Boolean isDelete = waterResourceDto.getIsDelete(); Boolean isDelete = waterResourceDto.getIsDelete();
// 查询属性信息 // 查询属性信息
String resourceType = waterResourceDto.getResourceType(); String resourceType = waterResourceDto.getResourceType();
...@@ -214,26 +237,35 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate ...@@ -214,26 +237,35 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
waterResourceHydrantService.getOne(new QueryWrapper<WaterResourceHydrant>().eq( waterResourceHydrantService.getOne(new QueryWrapper<WaterResourceHydrant>().eq(
"resource_id", "resource_id",
sequenceNbr)); sequenceNbr));
BeanUtils.copyProperties(waterResourceHydrant, waterResourceDto); if(null != waterResourceHydrant) {
BeanUtils.copyProperties(waterResourceHydrant, waterResourceDto);
}
break; break;
case "crane": case "crane":
WaterResourceCrane waterResourceCrane = WaterResourceCrane waterResourceCrane =
waterResourceCraneService.getOne(new QueryWrapper<WaterResourceCrane>().eq("resource_id", waterResourceCraneService.getOne(new QueryWrapper<WaterResourceCrane>().eq("resource_id",
sequenceNbr)); sequenceNbr));
BeanUtils.copyProperties(waterResourceCrane, waterResourceDto); if(null != waterResourceCrane) {
BeanUtils.copyProperties(waterResourceCrane, waterResourceDto);
}
break; break;
case "natural": case "natural":
WaterResourceNatural waterResourceNatural = WaterResourceNatural waterResourceNatural =
waterResourceNaturalService.getOne(new QueryWrapper<WaterResourceNatural>().eq( waterResourceNaturalService.getOne(new QueryWrapper<WaterResourceNatural>().eq(
"resource_id", "resource_id",
sequenceNbr)); sequenceNbr));
BeanUtils.copyProperties(waterResourceNatural, waterResourceDto); if(null != waterResourceNatural) {
BeanUtils.copyProperties(waterResourceNatural, waterResourceDto);
}
break; break;
case "pool": case "pool":
WaterResourcePool waterResourcePool = WaterResourcePool waterResourcePool =
waterResourcePoolService.getOne(new QueryWrapper<WaterResourcePool>().eq("resource_id", waterResourcePoolService.getOne(new QueryWrapper<WaterResourcePool>().eq("resource_id",
sequenceNbr)); sequenceNbr));
BeanUtils.copyProperties(waterResourcePool, waterResourceDto); if(null != waterResourcePool) {
BeanUtils.copyProperties(waterResourcePool, waterResourceDto);
}
break; break;
} }
} }
......
...@@ -277,8 +277,6 @@ public class AlertSubmittedController extends BaseController { ...@@ -277,8 +277,6 @@ public class AlertSubmittedController extends BaseController {
alertSubmittedService.generateMob(alertCalledFormDto.getAlertCalled()); alertSubmittedService.generateMob(alertCalledFormDto.getAlertCalled());
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); e.printStackTrace();
} }
......
...@@ -98,19 +98,19 @@ public class VoiceRecordFileController extends BaseController { ...@@ -98,19 +98,19 @@ public class VoiceRecordFileController extends BaseController {
page.setSize(pageSize); page.setSize(pageSize);
String sortParam = ""; String sortParam = "";
String sortRule = ""; String sortRule = "";
if(sort!=null) { // 排序失效 // if(sort!=null) { // 排序失效
String[] date= sort.split(","); // String[] date= sort.split(",");
if(date[1].equals("ascend")) { // if(date[1].equals("ascend")) {
sortParam = RedisKey.humpToLine(date[0]); // sortParam = RedisKey.humpToLine(date[0]);
sortRule = "asc"; // sortRule = "asc";
}else { // }else {
sortParam =RedisKey.humpToLine(date[0]); // sortParam =RedisKey.humpToLine(date[0]);
sortRule = "desc"; // sortRule = "desc";
} // }
}else { // }else {
sortParam = "call_time"; // sortParam = "tel_start_time";
sortRule = "desc"; // sortRule = "desc";
} // }
Page<VoiceRecordFileDto> pageBean = voiceRecordFileService.queryRecordListByQueryDto(page, Page<VoiceRecordFileDto> pageBean = voiceRecordFileService.queryRecordListByQueryDto(page,
model.getTelStartTimeStr(),model.getTelEndTimeStr(),model.getFileType(),model.getCaller(), model.getTelStartTimeStr(),model.getTelEndTimeStr(),model.getFileType(),model.getCaller(),
model.getCalled(),sortParam,sortRule); model.getCalled(),sortParam,sortRule);
......
...@@ -72,6 +72,7 @@ public class AlertCalledAction { ...@@ -72,6 +72,7 @@ public class AlertCalledAction {
@RuleMethod(methodLabel = "短信报送", project = "西咸机场119接处警规则") @RuleMethod(methodLabel = "短信报送", project = "西咸机场119接处警规则")
public void sendcmd(String smsCode, String sendType, List<Map<String,Object>> submittedList, Object object) throws Exception { public void sendcmd(String smsCode, String sendType, List<Map<String,Object>> submittedList, Object object) throws Exception {
System.out.println("接收到规则调用--------------西咸机场119接处警规则/alertCalledRule");
alertSubmittedService.ruleCallbackAction(smsCode, submittedList, object); alertSubmittedService.ruleCallbackAction(smsCode, submittedList, object);
} }
......
package com.yeejoin.amos.boot.module.jcs.biz.rule.action; package com.yeejoin.amos.boot.module.jcs.biz.rule.action;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.PowerrTransferLogServiceImpl; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.PowerrTransferLogServiceImpl;
...@@ -57,16 +58,18 @@ public class PowerTransferAction { ...@@ -57,16 +58,18 @@ public class PowerTransferAction {
if (object instanceof AlertCallePowerTransferRo) { if (object instanceof AlertCallePowerTransferRo) {
AlertCallePowerTransferRo calledRo = (AlertCallePowerTransferRo) object; AlertCallePowerTransferRo calledRo = (AlertCallePowerTransferRo) object;
powerrTransferLogServiceImpl.savePowerTransferLog(calledRo); // 获取力量调派发送人员
List<String> persons = new ArrayList<>();
calledRo.getPowerTransType();
if (FireBrigadeTypeEnum.专职消防队.getKey().equals(calledRo.getPowerTransType())) { if (FireBrigadeTypeEnum.专职消防队.getKey().equals(calledRo.getPowerTransType())) {
alertSubmittedService.ruleCallbackActionForPowerTransferForCar(smsCode, sendIds, object);//消防车辆 alertSubmittedService.ruleCallbackActionForPowerTransferForCar(smsCode, sendIds, object,persons);//消防车辆
} else if (FireBrigadeTypeEnum.医疗救援队.getKey().equals(calledRo.getPowerTransType())) { } else if (FireBrigadeTypeEnum.医疗救援队.getKey().equals(calledRo.getPowerTransType())) {
alertSubmittedService.ruleCallbackActionForPowerTransferForAid(smsCode, sendIds, object);//120急救站 alertSubmittedService.ruleCallbackActionForPowerTransferForAid(smsCode, sendIds, object,persons);//120急救站
} else if (FireBrigadeTypeEnum.监控大队.getKey().equals(calledRo.getPowerTransType())) { } else if (FireBrigadeTypeEnum.监控大队.getKey().equals(calledRo.getPowerTransType())) {
alertSubmittedService.ruleCallbackActionForPowerTransferForSurvBrigade(smsCode, sendIds, object);//监控大队 alertSubmittedService.ruleCallbackActionForPowerTransferForSurvBrigade(smsCode, sendIds, object,persons);//监控大队
} }
powerrTransferLogServiceImpl.savePowerTransferLog(calledRo,persons);
} }
} }
} }
...@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils; ...@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCallePowerTransferRo; import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCallePowerTransferRo;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyDto; import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyResourcesDto; import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyResourcesDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompany; import com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompany;
import com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompanyResources; import com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompanyResources;
import com.yeejoin.amos.boot.module.jcs.api.entity.PowerrTransferLog; import com.yeejoin.amos.boot.module.jcs.api.entity.PowerrTransferLog;
...@@ -15,6 +16,7 @@ import com.yeejoin.amos.boot.module.jcs.api.enums.FireBrigadeTypeEnum; ...@@ -15,6 +16,7 @@ import com.yeejoin.amos.boot.module.jcs.api.enums.FireBrigadeTypeEnum;
import com.yeejoin.amos.boot.module.jcs.api.mapper.PowerrTransferLogMapper; import com.yeejoin.amos.boot.module.jcs.api.mapper.PowerrTransferLogMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IPowerrTransferLogService; import com.yeejoin.amos.boot.module.jcs.api.service.IPowerrTransferLogService;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerrTransferLogDto; import com.yeejoin.amos.boot.module.jcs.api.dto.PowerrTransferLogDto;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...@@ -42,6 +44,9 @@ public class PowerrTransferLogServiceImpl extends BaseService<PowerrTransferLogD ...@@ -42,6 +44,9 @@ public class PowerrTransferLogServiceImpl extends BaseService<PowerrTransferLogD
@Autowired @Autowired
PowerTransferCompanyResourcesServiceImpl powerTransferCompanyResourcesService; PowerTransferCompanyResourcesServiceImpl powerTransferCompanyResourcesService;
@Autowired
AlertCalledServiceImpl iAlertCalledService;
/** /**
* 分页查询 * 分页查询
*/ */
...@@ -98,11 +103,16 @@ public class PowerrTransferLogServiceImpl extends BaseService<PowerrTransferLogD ...@@ -98,11 +103,16 @@ public class PowerrTransferLogServiceImpl extends BaseService<PowerrTransferLogD
} }
public void savePowerTransferLog( AlertCallePowerTransferRo alertCallePowerTransferRo) { public void savePowerTransferLog( AlertCallePowerTransferRo alertCallePowerTransferRo, List<String> persons) {
String powerTransType = alertCallePowerTransferRo.getPowerTransType(); String powerTransType = alertCallePowerTransferRo.getPowerTransType();
AlertCalled alertCalled = iAlertCalledService.getById(alertCallePowerTransferRo.getSequenceNbr());
String personName = "";
if (persons.size() > 0) {
personName = StringUtils.join(persons.toArray(),",");
}
final String receiveName = personName;
List<PowerrTransferLog> list = new ArrayList<>(); List<PowerrTransferLog> list = new ArrayList<>();
if (FireBrigadeTypeEnum.专职消防队.getKey().equals(powerTransType)) { if (FireBrigadeTypeEnum.专职消防队.getKey().equals(powerTransType)) {
List<Object> companyDetail = JSONArray.parseArray(JSON.toJSON(alertCallePowerTransferRo.getCompany()).toString(),Object.class); List<Object> companyDetail = JSONArray.parseArray(JSON.toJSON(alertCallePowerTransferRo.getCompany()).toString(),Object.class);
for (Object powerTransferCompanyDto : companyDetail) { for (Object powerTransferCompanyDto : companyDetail) {
PowerTransferCompanyDto powerDto = JSONObject.parseObject(JSON.toJSON(powerTransferCompanyDto).toString(), PowerTransferCompanyDto.class); PowerTransferCompanyDto powerDto = JSONObject.parseObject(JSON.toJSON(powerTransferCompanyDto).toString(), PowerTransferCompanyDto.class);
...@@ -110,7 +120,8 @@ public class PowerrTransferLogServiceImpl extends BaseService<PowerrTransferLogD ...@@ -110,7 +120,8 @@ public class PowerrTransferLogServiceImpl extends BaseService<PowerrTransferLogD
powerTransferCompanyResourcesDtoList.stream().forEach(f-> { powerTransferCompanyResourcesDtoList.stream().forEach(f-> {
PowerrTransferLog pw = new PowerrTransferLog(); PowerrTransferLog pw = new PowerrTransferLog();
pw.setResourceId(f.getSequenceNbr()); pw.setResourceId(f.getSequenceNbr());
pw.setReceiveName(f.getRecUserName()); pw.setReceiveName(receiveName);
pw.setRecUserName(alertCalled.getRecUserName());
try { try {
pw.setSendTime(DateUtils.dateTimeToDateString(new Date(System.currentTimeMillis()))); pw.setSendTime(DateUtils.dateTimeToDateString(new Date(System.currentTimeMillis())));
} catch (ParseException ex) { } catch (ParseException ex) {
...@@ -127,7 +138,8 @@ public class PowerrTransferLogServiceImpl extends BaseService<PowerrTransferLogD ...@@ -127,7 +138,8 @@ public class PowerrTransferLogServiceImpl extends BaseService<PowerrTransferLogD
PowerTransferCompanyDto powerDto = JSONObject.parseObject(JSON.toJSON(powerTransferCompanyDto).toString(), PowerTransferCompanyDto.class); PowerTransferCompanyDto powerDto = JSONObject.parseObject(JSON.toJSON(powerTransferCompanyDto).toString(), PowerTransferCompanyDto.class);
PowerrTransferLog pw = new PowerrTransferLog(); PowerrTransferLog pw = new PowerrTransferLog();
pw.setTeamId(powerDto.getSequenceNbr()); pw.setTeamId(powerDto.getSequenceNbr());
pw.setReceiveName(powerDto.getRecUserName()); pw.setReceiveName(receiveName);
pw.setRecUserName(alertCalled.getRecUserName());
try { try {
pw.setSendTime(DateUtils.dateTimeToDateString(new Date(System.currentTimeMillis()))); pw.setSendTime(DateUtils.dateTimeToDateString(new Date(System.currentTimeMillis())));
} catch (ParseException ex) { } catch (ParseException ex) {
......
...@@ -71,6 +71,7 @@ public class RuleAlertCalledService { ...@@ -71,6 +71,7 @@ public class RuleAlertCalledService {
if(!ValidationUtil.isEmpty(mobiles)) { if(!ValidationUtil.isEmpty(mobiles)) {
alertCalledRo.setIds(mobiles); alertCalledRo.setIds(mobiles);
} }
System.out.println("触发规则调用--------------西咸机场119接处警规则/alertCalledRule");
//触发规则 //触发规则
ruleTrigger.publish(alertCalledRo, "西咸机场119接处警规则/alertCalledRule", new String[0]); ruleTrigger.publish(alertCalledRo, "西咸机场119接处警规则/alertCalledRule", new String[0]);
......
...@@ -19,7 +19,7 @@ import java.util.Date; ...@@ -19,7 +19,7 @@ import java.util.Date;
public class RulePlanService { public class RulePlanService {
private final String packageId = "消息/addCheckRule"; private final String packageId = "消息/addCheckRule";
private final String msgType = "patrol"; private final String msgType = "patrolSystem";
private final String APP = "APP"; private final String APP = "APP";
private final String WEB = "WEB"; private final String WEB = "WEB";
private final String APP_WEB = "APP/WEB"; private final String APP_WEB = "APP/WEB";
......
...@@ -116,6 +116,8 @@ public class RemoteSecurityService { ...@@ -116,6 +116,8 @@ public class RemoteSecurityService {
toke = getLogin(dPasswordAuthModel); toke = getLogin(dPasswordAuthModel);
} }
} }
RequestContext.setAppKey(toke.getAppKey());
RequestContext.setToken(toke.getToke());
} catch (InnerInvokException e) { } catch (InnerInvokException e) {
e.printStackTrace(); e.printStackTrace();
} }
......
...@@ -31,6 +31,8 @@ public class EquipmentIndexController extends BaseController { ...@@ -31,6 +31,8 @@ public class EquipmentIndexController extends BaseController {
@Autowired @Autowired
EquipmentIndexServiceImpl equipmentIndexServiceImpl; EquipmentIndexServiceImpl equipmentIndexServiceImpl;
/** /**
* 新增设备指标 * 新增设备指标
* *
......
package com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl; package com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient;
import com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentDto; import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentIndexDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.Equipment; import com.yeejoin.amos.boot.module.tzs.flc.api.entity.Equipment;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.EquipmentIndex;
import com.yeejoin.amos.boot.module.tzs.flc.api.enums.EquipmentStatusEnum; import com.yeejoin.amos.boot.module.tzs.flc.api.enums.EquipmentStatusEnum;
import com.yeejoin.amos.boot.module.tzs.flc.api.mapper.EquipmentMapper; import com.yeejoin.amos.boot.module.tzs.flc.api.mapper.EquipmentMapper;
import com.yeejoin.amos.boot.module.tzs.flc.api.service.IEquipmentService; import com.yeejoin.amos.boot.module.tzs.flc.api.service.IEquipmentService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
...@@ -28,6 +35,14 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E ...@@ -28,6 +35,14 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
@Autowired @Autowired
SourceFileServiceImpl sourceFileService; SourceFileServiceImpl sourceFileService;
@Autowired
EquipFeignClient equipFeignClient;
@Autowired
EquipmentIndexServiceImpl equipmentIndexServiceImpl;
/** /**
* 分页查询 * 分页查询
*/ */
...@@ -44,9 +59,18 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E ...@@ -44,9 +59,18 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
@Override @Override
public EquipmentDto createEquipment(EquipmentDto model) { public EquipmentDto createEquipment(EquipmentDto model) {
UUID uuid = UUID.randomUUID(); model.setStatus(EquipmentStatusEnum.未安装.getCode()); // 0 未安装 1 已安装
model.setEquipId(uuid.toString());
model = this.createWithModel(model); model = this.createWithModel(model);
// 保存设备参数信息
List<EquipmentIndexDto> equipmentIndex = model.getEquipmentIndex();
if(equipmentIndex != null && equipmentIndex.size()>0) {
for(EquipmentIndexDto t : equipmentIndex) {
t.setEquipmentId(model.getSequenceNbr());
t.setEquipmentName(model.getName());
equipmentIndexServiceImpl.createWithModel(t);
}
}
saveSourceFile(model); saveSourceFile(model);
return model; return model;
} }
...@@ -55,6 +79,17 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E ...@@ -55,6 +79,17 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
public EquipmentDto updateEquipment(EquipmentDto model) { public EquipmentDto updateEquipment(EquipmentDto model) {
this.updateWithModel(model); this.updateWithModel(model);
saveSourceFile(model); saveSourceFile(model);
// 先删除参数信息 再添加新的参数信息
equipmentIndexServiceImpl.remove(new LambdaQueryWrapper<EquipmentIndex>().eq(EquipmentIndex::getEquipmentId,model.getSequenceNbr()));
// 保存设备参数信息
List<EquipmentIndexDto> equipmentIndex = model.getEquipmentIndex();
if(equipmentIndex != null && equipmentIndex.size()>0) {
for(EquipmentIndexDto t : equipmentIndex) {
t.setEquipmentId(model.getSequenceNbr());
t.setEquipmentName(model.getName());
equipmentIndexServiceImpl.createWithModel(t);
}
}
Bean.copyExistPropertis(this.queryBySeq(model.getSequenceNbr()), model); Bean.copyExistPropertis(this.queryBySeq(model.getSequenceNbr()), model);
return model; return model;
} }
...@@ -71,6 +106,37 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E ...@@ -71,6 +106,37 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
return false; return false;
} }
@Override
public List<Object> getEquipmentType() {
return equipFeignClient.getClassification().getResult();
}
@Override
public List<Object> getEquipmentClass(String typeCode) {
return equipFeignClient.getEquipmentList(typeCode).getResult();
}
@Override
public EquipmentDto getEquipmentById(Long sequenceNbr) {
// 获取基本信息
Equipment equipment = this.getById(sequenceNbr);
EquipmentDto result = new EquipmentDto();
BeanUtils.copyProperties(equipment,result);
// 封装附件
result.setAttachments(sourceFileService.getAttachments(equipment.getSequenceNbr()));
// 封装详细参数
List<EquipmentIndex> indexList = equipmentIndexServiceImpl.list(new LambdaQueryWrapper<EquipmentIndex>().eq(EquipmentIndex::getEquipmentId,equipment.getSequenceNbr()));
List<EquipmentIndexDto> dtoList = new ArrayList<>();
indexList.stream().forEach(t -> {
EquipmentIndexDto temp = new EquipmentIndexDto();
BeanUtils.copyProperties(t,temp);
dtoList.add(temp);
});
result.setEquipmentIndex(dtoList);
return result;
}
// 保存附件信息 // 保存附件信息
public void saveSourceFile(EquipmentDto model) { public void saveSourceFile(EquipmentDto model) {
if (model.getAttachments() != null) { if (model.getAttachments() != null) {
......
...@@ -2310,5 +2310,17 @@ ...@@ -2310,5 +2310,17 @@
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="chenzhao" id="2021-12-04-cz-1">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_maintenance_company"/>
</preConditions>
<comment>新增两个字段用来保存amos账户信息 </comment>
<sql>
ALTER TABLE `cb_maintenance_company` add amos_org_id varchar(100) COMMENT 'amos平台id';
ALTER TABLE `cb_maintenance_company` add amos_org_name varchar(30) COMMENT 'amos账户名称';
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
#DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://192.168.1.10:3306/xiy_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
##eureka properties:
eureka.client.service-url.defaultZone =http://192.168.1.10:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://192.168.1.10:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://192.168.1.10:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://192.168.1.10:${server.port}${server.servlet.context-path}/swagger-ui.html
## ES properties:
biz.elasticsearch.address=113.134.211.174
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
## unit(h)
alertcall.es.synchrony.time=48
#redis properties:
spring.redis.database=1
spring.redis.host=192.168.1.10
spring.redis.port=6379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://192.168.1.10:1883
emqx.user-name=admin
emqx.password=public
tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4
tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.cti.url=http://36.46.151.113:8000
tzs.wechat.url=https://api.weixin.qq.com
tzs.wechat.appid=wx79aca5bb1cb4af92
tzs.wechat.secret=f3a12323ba731d282c3d4698c27c3e97
##wechatToken
tzs.wechat.token=yeejoin_2021
##wechatTicketUrl
tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=
tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM
tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html
tzs.wechat.tempId.wx=rags-expfNSBB-h2WenuBI2c6pCEndH4uwTtOqlHqDM
tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html
tzs.wechat.tempId.ts=rags-expfNSBB-h2WenuBI2c6pCEndH4uwTtOqlHqDM
tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html
mqtt.topic.task.newtask=tzs-task-newtask
mqtt.topic.task.personinfo=tzs-task-personinfo
mqtt.topic.elevator.push=/tzs/tcb_elevator
mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo
mqtt.topic.alertReport.push=/tzs/tcb_alertReport
mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart
mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix
mqtt.topic.cti.push=/cti/record
cti.user.name=tzs_cti
cti.user.pwd=a1234567
flc.sms.tempCode=SMS_TZS_0001
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="log" />
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n" />
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/tzs.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>30</MaxHistory>
<!--日志文件大小-->
<MaxFileSize>30mb</MaxFileSize>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger name="com.apache.ibatis" level="DEBUG"/>
<logger name="org.mybatis" level="DEBUG" />
<logger name="java.sql.Connection" level="DEBUG"/>
<logger name="java.sql.Statement" level="DEBUG"/>
<logger name="java.sql.PreparedStatement" level="DEBUG"/>
<logger name="org.springframework" level="DEBUG"/>
<logger name="com.baomidou.mybatisplus" level="DEBUG"/>
<logger name="org.apache.activemq" level="INFO"/>
<logger name="org.typroject" level="DEBUG"/>
<logger name="com.yeejoin" level="DEBUG"/>
<!-- 日志输出级别 -->
<root level="DEBUG">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
\ No newline at end of file
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