Commit 448590fd authored by lisong's avatar lisong

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

parents 536108e1 fef0ea07
......@@ -284,7 +284,12 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
public boolean saveExcel(List<KeySiteExcleDto> excelDtoList) {
Map<String, String> maps = getAllBuildingIdForParentBuilingIds(excelDtoList);
List<KeySite> excelList = new ArrayList<KeySite>();
List<OrgUsr> comDeptList = orgUsrMapper.companyTreeByUserAndType(null);
Map<String, Object> param = new HashMap<>();
param.put("bizOrgCode", null);
param.put("type", null);
List<OrgUsr> comDeptList = orgUsrMapper.companyTreeByUserAndType(param);
Map<Long, OrgUsr> comDeptMap = comDeptList.stream()
.collect(Collectors.toMap(BaseEntity::getSequenceNbr, Function.identity()));
for (KeySiteExcleDto keySiteExcleDto : excelDtoList) {
......
......@@ -342,7 +342,7 @@ public class MaintenanceResourceServiceImpl extends ServiceImpl<MaintenanceResou
resourceDataVo.setMaintenanceCompanyId(x.getMaintenanceUnitId());
resourceDataVo.setMaintenanceCompanyName(x.getMaintenanceUnit());
resourceDataVo.setCreateDate(x.getRecDate());
resourceDataVo.setLocation(x.getBelongBuilding());
// resourceDataVo.setLocation(x.getBelongBuilding()); //覆盖了正确的值
resourceDataVo.setFireFacilityCode(x.getEquipCode());
resourceDataVoList.add(resourceDataVo);
keyList.add(String.join("-", String.valueOf(sequenceNbr), resourceType));
......
......@@ -498,12 +498,20 @@ public class CheckController extends AbstractBaseController {
@ApiParam(value = "业主单位") @RequestParam(value = "companyId", required = false) String companyId,
@ApiParam(value = "设施Id") @RequestParam(value = "equipId", required = false) String equipId,
@ApiParam(value = "当前页") @RequestParam(value = "pageNumber") int pageNumber,
@ApiParam(value = "页大小") @RequestParam(value = "pageSize") int pageSize) throws Exception {
@ApiParam(value = "页大小") @RequestParam(value = "pageSize") int pageSize,
@ApiParam(value = "qrCode") @RequestParam(value = "qrCode", required = false) String qrCode) throws Exception {
HashMap<String, Object> params = new HashMap<>();
ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getOrgCode(reginParams);
Map<String, Object> authMap = Bean.BeantoMap(reginParams.getPersonIdentity());
params.putAll(authMap);
params.put("person", person);
if (StringUtil.isNotEmpty(person)) {
ResponseModel<String> idByAmosOrgId = jcsFeignClient.getIdByAmosOrgId(person);
if (StringUtil.isNotEmpty(idByAmosOrgId.getResult())) {
params.put("person", idByAmosOrgId.getResult());
}
}
params.put("userId", userId);
if (StringUtil.isNotEmpty(userId)) {
ResponseModel<String> idByAmosOrgId = jcsFeignClient.getIdByAmosOrgId(userId);
......@@ -518,10 +526,10 @@ public class CheckController extends AbstractBaseController {
}
params.put("beginTime", beginTime);
params.put("endTime", endTime);
params.put("person", person);
params.put("companyId", companyId);
params.put("equipId", equipId);
params.put("orgCode", loginOrgCode);
params.put("qrCode", qrCode);
CommonPageable pageable = new CommonPageable(pageNumber, pageSize);
return CommonResponseUtil.success(checkService.getCheckPage(params, pageable));
}
......
......@@ -1906,6 +1906,7 @@
) checkDate,
pp.id pointId,
pp.equipment_id equipmentId,
pp.point_no as qrCode,
pp.equipment_name equipmentName,
pp.name equipmentDetailName,
pp.belong_system_id systemId,
......@@ -1916,6 +1917,10 @@
pc.org_code AS orgCode
FROM p_check pc
LEFT JOIN p_point pp ON pp.id = pc.point_id
<if test="person != null and person != ''">
LEFT JOIN p_plan_task_detail ptd on ptd.id = pc.plan_task_detail_id
where ptd.executor_id = #{person}
</if>
) a
<include refid="mobile-check-record-where" />
<if test="orderRule == null or orderRule == ''"> order by checkDate </if>
......@@ -1945,6 +1950,8 @@
</if>
<if test="finishStatus != null"> and a.finishStatus = #{finishStatus}</if>
<if test="equipId != null and equipId != '' "> and a.equipId = #{equipId}</if>
<if test="qrCode != null and qrCode != ''"> and a.qrCode = #{qrCode}</if>
<if test="beginTime != null and beginTime != '' and endTime != null and endTime != '' ">
AND (
(
......@@ -2013,6 +2020,7 @@
) checkDate,
pp.id pointId,
pp.equipment_id equipmentId,
pp.point_no as qrCode,
pp.equipment_name equipmentName,
pp.belong_system_id systemId,
pp.belong_system_name systemName,
......@@ -2021,6 +2029,10 @@
pc.org_code AS orgCode
FROM p_check pc
LEFT JOIN p_point pp ON pp.id = pc.point_id
<if test="person != null and person != ''">
LEFT JOIN p_plan_task_detail ptd on ptd.id = pc.plan_task_detail_id
where ptd.executor_id = #{person}
</if>
) a
<include refid="mobile-check-record-where" />
</select>
......
package com.yeejoin.amos.speech;
import com.alibaba.nls.client.protocol.InputFormatEnum;
import com.alibaba.nls.client.protocol.NlsClient;
import com.alibaba.nls.client.protocol.SampleRateEnum;
import com.alibaba.nls.client.protocol.asr.SpeechTranscriber;
import com.alibaba.nls.client.protocol.asr.SpeechTranscriberListener;
import com.alibaba.nls.client.protocol.asr.SpeechTranscriberResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -29,6 +31,7 @@ public class AppSpeechTranscriber {
private final TimerTask timerTask;
private final String localIpAddress;
private int idleTime = 0;
private NlsClient client;
public AppSpeechTranscriber(SpeechTranscriberListener listener, DatagramSocket serverSocket, String localIpAddress) {
this.localIpAddress = localIpAddress;
......@@ -73,7 +76,7 @@ public class AppSpeechTranscriber {
}
idleTime = 0;
logger.warn("收到数据包:" + b.length);
//去掉前12个字节的rtp包头,后面的332字节为语音数据
//去掉前12个字节的rtp包头,后面的320字节为语音数据
//4秒未再次调用此方法,阿里云会抛出超时异常
transcriber.send(Arrays.copyOfRange(b, 12, b.length));
}
......@@ -112,14 +115,15 @@ public class AppSpeechTranscriber {
transcriber.setEnablePunctuation(false);
//是否将返回结果规整化,比如将一百返回为100。
transcriber.setEnableITN(true);
//设置vad断句参数。默认值:800ms,有效值:200ms~2000ms。
transcriber.addCustomedParam("max_sentence_silence", 800);
//transcriber.addCustomedParam("max_sentence_silence", 600);
//设置是否语义断句。
//transcriber.addCustomedParam("enable_semantic_sentence_detection",false);
//设置是否开启顺滑。
//transcriber.addCustomedParam("disfluency",true);
//设置是否开启词模式。
transcriber.addCustomedParam("enable_words", true);
//transcriber.addCustomedParam("enable_words",true);
//设置vad噪音阈值参数,参数取值为-1~+1,如-0.9、-0.8、0.2、0.9。
//取值越趋于-1,判定为语音的概率越大,亦即有可能更多噪声被当成语音被误识别。
//取值越趋于+1,判定为噪音的越多,亦即有可能更多语音段被当成噪音被拒绝识别。
......@@ -130,9 +134,10 @@ public class AppSpeechTranscriber {
//设置训练后的定制热词id。
//transcriber.addCustomedParam("vocabulary_id","你的定制热词id");
//设置是否忽略单句超时。
transcriber.addCustomedParam("enable_ignore_sentence_timeout", false);
transcriber.addCustomedParam("enable_ignore_sentence_timeout",false);
//vad断句开启后处理。
//transcriber.addCustomedParam("enable_vad_unify_post",false);
//此方法将以上参数设置序列化为JSON发送给服务端,并等待服务端确认。
}
}
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