Commit b640b114 authored by tangwei's avatar tangwei

Merge branch 'developer' into develop_ccs

parents 2c4512be 117e47c4
...@@ -24,4 +24,6 @@ public interface UnitInfoMapper extends BaseMapper<UnitInfo> { ...@@ -24,4 +24,6 @@ public interface UnitInfoMapper extends BaseMapper<UnitInfo> {
@Param("address") String address, @Param("address") String address,
@Param("orgName") String orgName, @Param("orgName") String orgName,
@Param("organizationCode") String organizationCode); @Param("organizationCode") String organizationCode);
List<UnitInfo> getUnitWithoutQrcode();
} }
...@@ -40,4 +40,6 @@ public interface IUnitInfoService { ...@@ -40,4 +40,6 @@ public interface IUnitInfoService {
List<UnitInfoDto> getAllUnit(); List<UnitInfoDto> getAllUnit();
List<UnitInfoDto> getUseUnit(String unitType, String address, String orgName, String organizationCode); List<UnitInfoDto> getUseUnit(String unitType, String address, String orgName, String organizationCode);
Boolean addQRcode();
} }
...@@ -51,4 +51,21 @@ ...@@ -51,4 +51,21 @@
</select> </select>
<select id="getUnitWithoutQrcode" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo">
SELECT
a.*
FROM
tz_flc_unit_info a
LEFT JOIN cb_source_file f on f.source_id = a.sequence_nbr and f.file_category = 'qrCode'
WHERE
a.is_delete = 0
AND (
a.unit_status = '1'
OR a.is_change = 1)
and f.sequence_nbr is null
</select>
</mapper> </mapper>
...@@ -125,7 +125,7 @@ public class EquipmentIndexImpl extends ServiceImpl<EquipmentIndexMapper, Equipm ...@@ -125,7 +125,7 @@ public class EquipmentIndexImpl extends ServiceImpl<EquipmentIndexMapper, Equipm
equipmentSpecificIndex.setEquipmentSpecificId(y.getId()); equipmentSpecificIndex.setEquipmentSpecificId(y.getId());
equipmentSpecificIndex.setEquipmentIndexId(equipmentIndex.getId()); equipmentSpecificIndex.setEquipmentIndexId(equipmentIndex.getId());
equipmentSpecificIndex.setEquipmentIndexKey(equipmentIndex.getPerfQuotaDefinitionId()); equipmentSpecificIndex.setEquipmentIndexKey(equipmentIndex.getPerfQuotaDefinitionId());
equipmentSpecificIndex.setEquipmentSpecificIndexName(equipmentIndex.getPerfQuotaName()); equipmentSpecificIndex.setEquipmentIndexName(equipmentIndex.getPerfQuotaName());
equipmentSpecificIndex.setEquipmentSpecialName(y.getName()); equipmentSpecificIndex.setEquipmentSpecialName(y.getName());
equipmentSpecificIndexList.add(equipmentSpecificIndex); equipmentSpecificIndexList.add(equipmentSpecificIndex);
}); });
......
...@@ -1613,20 +1613,20 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -1613,20 +1613,20 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
if (!ObjectUtils.isEmpty(equipmentSpecific)) { if (!ObjectUtils.isEmpty(equipmentSpecific)) {
QueryWrapper<VideoEquipmentSpecific> queryWrapper = new QueryWrapper<>(); QueryWrapper<VideoEquipmentSpecific> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("equipment_specific_id", equipmentSpecificId); queryWrapper.eq("equipment_specific_id", equipmentSpecificId);
boolean remove = videoEquipmentSpecificService.remove(queryWrapper); if (0 == videoIdList.size()) {
if (remove) { videoEquipmentSpecificService.remove(queryWrapper);
List<VideoEquipmentSpecific> videoSpecificList = new ArrayList<>();
videoIdList.parallelStream().forEach(x -> {
VideoEquipmentSpecific videoEquipmentSpecific = new VideoEquipmentSpecific();
videoEquipmentSpecific.setVideoId(x);
videoEquipmentSpecific.setEquipmentSpecificId(equipmentSpecificId);
videoSpecificList.add(videoEquipmentSpecific);
});
videoEquipmentSpecificService.saveBatch(videoSpecificList);
return Boolean.TRUE; return Boolean.TRUE;
}
List<VideoEquipmentSpecific> list = videoEquipmentSpecificService.getBaseMapper().selectList(queryWrapper);
if (0 < list.size()) {
boolean remove = videoEquipmentSpecificService.remove(queryWrapper);
if (remove) {
this.bingEquipmentRelationshipToVideo(videoIdList, equipmentSpecificId);
}
} else { } else {
throw new RuntimeException("设备摄像头绑定关系中此设备不存在!"); this.bingEquipmentRelationshipToVideo(videoIdList, equipmentSpecificId);
} }
return Boolean.FALSE;
} else { } else {
throw new RuntimeException("未获取到此设备!"); throw new RuntimeException("未获取到此设备!");
} }
...@@ -1634,4 +1634,17 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -1634,4 +1634,17 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
throw new RuntimeException("设备ID为空!"); throw new RuntimeException("设备ID为空!");
} }
} }
private Boolean bingEquipmentRelationshipToVideo(List<Long> videoIdList, Long equipmentSpecificId) {
List<VideoEquipmentSpecific> videoSpecificList = new ArrayList<>();
videoIdList.parallelStream().forEach(x -> {
VideoEquipmentSpecific videoEquipmentSpecific = new VideoEquipmentSpecific();
videoEquipmentSpecific.setVideoId(x);
videoEquipmentSpecific.setEquipmentSpecificId(equipmentSpecificId);
videoSpecificList.add(videoEquipmentSpecific);
});
videoEquipmentSpecificService.saveBatch(videoSpecificList);
return Boolean.TRUE;
}
} }
...@@ -30,7 +30,8 @@ public class MqttEventReceiveServiceImpl implements MqttEventReceiveService { ...@@ -30,7 +30,8 @@ public class MqttEventReceiveServiceImpl implements MqttEventReceiveService {
JSONObject eventJson = JSONObject.parseObject(event); JSONObject eventJson = JSONObject.parseObject(event);
String eventContent = eventJson.getString("eventContent"); String eventContent = eventJson.getString("eventContent");
String eventType = eventJson.getString("eventType"); String eventType = String.valueOf(eventJson.get("eventType")).toString();
String eventPic = eventJson.getString("pic"); String eventPic = eventJson.getString("pic");
List<String> eventPicList = new ArrayList<String>(); List<String> eventPicList = new ArrayList<String>();
......
...@@ -592,7 +592,23 @@ public class AlertCalledController extends BaseController { ...@@ -592,7 +592,23 @@ public class AlertCalledController extends BaseController {
updateWrapper.set(AlertCalled::getForzenResult, alertCalledDto.getForzenResult()); updateWrapper.set(AlertCalled::getForzenResult, alertCalledDto.getForzenResult());
updateWrapper.set(AlertCalled::getAlertStatus, true); updateWrapper.set(AlertCalled::getAlertStatus, true);
updateWrapper.eq(AlertCalled::getSequenceNbr, alertCalledDto.getSequenceNbr()); updateWrapper.eq(AlertCalled::getSequenceNbr, alertCalledDto.getSequenceNbr());
return ResponseHelper.buildResponse(iAlertCalledService.update(updateWrapper)); Boolean flag = iAlertCalledService.update(updateWrapper);
if(flag) {
AlertCalledDto alertCalledVo = iAlertCalledService.queryBySeq(alertCalledDto.getSequenceNbr());
try {
redisUtils.del(RedisKey.TZS_ALERTCALLED_ID+alertCalledVo.getSequenceNbr());
} catch (Exception e) {
e.printStackTrace();
logger.error("删除redis失败:" + e.getMessage());
}
try {
eSAlertCalledService.updateEsAlertCalled(alertCalledVo);
} catch (Exception e) {
e.printStackTrace();
logger.error("更新es失败:" + e.getMessage());
}
}
return ResponseHelper.buildResponse(flag);
} }
/** /**
...@@ -612,7 +628,23 @@ public class AlertCalledController extends BaseController { ...@@ -612,7 +628,23 @@ public class AlertCalledController extends BaseController {
updateWrapper.set(AlertCalled::getFinalReason, alertCalledDto.getFinalReason()); updateWrapper.set(AlertCalled::getFinalReason, alertCalledDto.getFinalReason());
updateWrapper.set(AlertCalled::getAlertStatus, true); updateWrapper.set(AlertCalled::getAlertStatus, true);
updateWrapper.eq(AlertCalled::getSequenceNbr, alertCalledDto.getSequenceNbr()); updateWrapper.eq(AlertCalled::getSequenceNbr, alertCalledDto.getSequenceNbr());
return ResponseHelper.buildResponse(iAlertCalledService.update(updateWrapper)); Boolean flag = iAlertCalledService.update(updateWrapper);
if(flag) {
AlertCalledDto alertCalledVo = iAlertCalledService.queryBySeq(alertCalledDto.getSequenceNbr());
try {
redisUtils.del(RedisKey.TZS_ALERTCALLED_ID+alertCalledVo.getSequenceNbr());
} catch (Exception e) {
e.printStackTrace();
logger.error("删除redis失败:" + e.getMessage());
}
try {
eSAlertCalledService.updateEsAlertCalled(alertCalledVo);
} catch (Exception e) {
e.printStackTrace();
logger.error("更新es失败:" + e.getMessage());
}
}
return ResponseHelper.buildResponse(flag);
} }
/** /**
......
...@@ -533,5 +533,33 @@ public class UnitInfoController extends BaseController { ...@@ -533,5 +533,33 @@ public class UnitInfoController extends BaseController {
} }
/**
* 判断用户号码是否存在
*
* @return
*/
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@GetMapping(value = "/hasExistPhone/{phone}")
@ApiOperation(httpMethod = "GET", value = "判断用户号码是否存在", notes = "判断用户号码是否存在")
public ResponseModel<Boolean> hasExistPhone( @PathVariable(value = "phone") String phone) {
Boolean flag = Privilege.agencyUserClient.checkLoginId(phone).getResult();
return ResponseHelper.buildResponse(flag);
}
/**
* 手动生成已通过企业的二维码
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/addQRcode")
@ApiOperation(httpMethod = "GET", value = "手动生成已通过企业的二维码", notes = "手动生成已通过企业的二维码")
public ResponseModel<Boolean> addQRcode() {
Boolean flag = unitInfoServiceImpl.addQRcode();
return ResponseHelper.buildResponse(flag);
}
} }
...@@ -558,6 +558,16 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit ...@@ -558,6 +558,16 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
} }
@Override @Override
public Boolean addQRcode() {
// 获取所有已经通过的且没有二维码的企业信息
List<UnitInfo> list = baseMapper.getUnitWithoutQrcode();
list.stream().forEach(t -> {
this.saveUnitInfoQrCode(t);
});
return true;
}
@Override
public List<UnitInfoDto> getAllUnit() { public List<UnitInfoDto> getAllUnit() {
return baseMapper.getAllUnit(); return baseMapper.getAllUnit();
} }
......
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
wlesal.equipment_index_id AS fireEquipmentIndexId, wlesal.equipment_index_id AS fireEquipmentIndexId,
wlesal.equipment_specific_index_key AS fireEquipmentSpecificIndexKey, wlesal.equipment_specific_index_key AS fireEquipmentSpecificIndexKey,
wlesal.equipment_specific_index_name AS fireEquipmentSpecificIndexName, wlesal.equipment_specific_index_name AS fireEquipmentSpecificIndexName,
wlesal.build_id AS buildId, wles.warehouse_structure_id AS buildId,
we.img AS imgUrl, we.img AS imgUrl,
CASE CASE
wlesal.equipment_specific_index_value wlesal.equipment_specific_index_value
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
AS fireEquipmentPointValue, AS fireEquipmentPointValue,
wlesal.type AS type, wlesal.type AS type,
wlesal.create_date AS createDate, wlesal.create_date AS createDate,
CONCAT_WS(' ',ware.full_name,wsd.description) AS warehouseStructureName, CONCAT_WS(' ',ware.full_name,wsd.description,wled.area) AS warehouseStructureName,
(select (select
group_concat(fet.`name`) group_concat(fet.`name`)
from f_equipment_fire_equipment as fefe from f_equipment_fire_equipment as fefe
......
...@@ -353,7 +353,8 @@ ...@@ -353,7 +353,8 @@
category.NAME AS categoryName, category.NAME AS categoryName,
category.CODE AS categoryCode, category.CODE AS categoryCode,
equipment_detail.area AS address, equipment_detail.area AS address,
CONCAT(area.prevName,'-',structure.NAME) AS acre, <!-- CONCAT(area.prevName,'-',structure.NAME) AS acre,-->
spec.position AS acre,
we.inspection_spec as inspectionSpecId, we.inspection_spec as inspectionSpecId,
0 as orderNo 0 as orderNo
FROM FROM
...@@ -390,7 +391,7 @@ ...@@ -390,7 +391,7 @@
</if> </if>
<if test="equipCode != '' and equipCode != null">and spec.code like concat("%", #{equipCode}, "%")</if> <if test="equipCode != '' and equipCode != null">and spec.code like concat("%", #{equipCode}, "%")</if>
<if test="equipName != '' and equipName != null"> <if test="equipName != '' and equipName != null">
and equipment_detail.name like CONCAT("%", #{equipName},'%') and spec.name like CONCAT("%", #{equipName},'%')
</if> </if>
</select> </select>
......
eureka.client.serviceUrl.defaultZone=http://172.16.10.72:10001/eureka/ eureka.client.serviceUrl.defaultZone=http://172.16.11.20:10001/eureka/
eureka.client.registry-fetch-interval-seconds=5 eureka.client.registry-fetch-interval-seconds=5
eureka.instance.prefer-ip-address=true eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always management.endpoint.health.show-details=always
...@@ -17,9 +17,9 @@ ribbon.MaxAutoRetriesNextServer = 2 ...@@ -17,9 +17,9 @@ ribbon.MaxAutoRetriesNextServer = 2
ribbon.MaxAutoRetries = 1 ribbon.MaxAutoRetries = 1
#DB properties: #DB properties:
spring.datasource.url = jdbc:mysql://172.16.6.60:3306/safety-business-3.0.1?useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai spring.datasource.url = jdbc:mysql://172.16.3.20:3307/autosys_business_v3.0.1.3?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
spring.datasource.username= root spring.datasource.username=root
spring.datasource.password= root_123 spring.datasource.password=123456
spring.datasource.driver-class-name = com.mysql.jdbc.Driver spring.datasource.driver-class-name = com.mysql.jdbc.Driver
spring.datasource.hikari.maxLifetime = 1765000 spring.datasource.hikari.maxLifetime = 1765000
spring.datasource.hikari.maximum-pool-size = 10 spring.datasource.hikari.maximum-pool-size = 10
...@@ -33,10 +33,10 @@ security.productApp=STUDIO_APP_MOBILE ...@@ -33,10 +33,10 @@ security.productApp=STUDIO_APP_MOBILE
security.appKey=studio_normalapp_3168830 security.appKey=studio_normalapp_3168830
#redis 配置 #redis 配置
spring.redis.database=0 spring.redis.database=1
spring.redis.host=172.16.10.85 spring.redis.host=172.16.11.20
spring.redis.port=6379 spring.redis.port=6379
spring.redis.password=amos2019Redis spring.redis.password=1234560
spring.redis.jedis.pool.max-active=200 spring.redis.jedis.pool.max-active=200
spring.redis.jedis.pool.max-wait=-1 spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=10 spring.redis.jedis.pool.max-idle=10
......
...@@ -47,19 +47,19 @@ tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a ...@@ -47,19 +47,19 @@ tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.cti.url=http://36.46.151.113:8000 tzs.cti.url=http://36.46.151.113:8000
tzs.wechat.url=https://api.weixin.qq.com tzs.wechat.url=https://api.weixin.qq.com
tzs.wechat.appid=wx79aca5bb1cb4af92 tzs.wechat.appid=wx8918c1aaad956617
tzs.wechat.secret=f3a12323ba731d282c3d4698c27c3e97 tzs.wechat.secret=337c3d8f3e749140d4f9aedc8311033b
##wechatToken ##wechatToken
tzs.wechat.token=yeejoin_2021 tzs.wechat.token=yeejoin_2021
##wechatTicketUrl ##wechatTicketUrl
tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token= tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=
tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw
tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html
tzs.wechat.tempId.wx=rags-expfNSBB-h2WenuBI2c6pCEndH4uwTtOqlHqDM tzs.wechat.tempId.wx=ofBIZS8Bup9s0zKbrGa8BfhVhS18H_hyC_OYXuBN6hI
tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html
tzs.wechat.tempId.ts=rags-expfNSBB-h2WenuBI2c6pCEndH4uwTtOqlHqDM tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU
tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html
mqtt.topic.task.newtask=tzs-task-newtask mqtt.topic.task.newtask=tzs-task-newtask
......
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