|
|
@@ -32,6 +32,7 @@ import okhttp3.*;
|
|
|
import okhttp3.sse.EventSource;
|
|
|
import okhttp3.sse.EventSourceListener;
|
|
|
import okhttp3.sse.EventSources;
|
|
|
+import org.apache.commons.collections4.MapUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -1105,7 +1106,9 @@ public class TakaiAiServiceImpl implements ITakaiAiService {
|
|
|
TakaiApplication paramsVo = TakaiApplication.builder().approver(userId).flag("0").build();
|
|
|
if(dictData.getDictCode() == 41){
|
|
|
Map<String, Object> l = searchAppTypeGroupList(paramsVo, dictData);
|
|
|
- result.add(l);
|
|
|
+ if(!MapUtils.isEmpty(l)){
|
|
|
+ result.add(l);
|
|
|
+ }
|
|
|
}else{
|
|
|
paramsVo.setTypeId(Long.valueOf(dictData.getDictCode()));
|
|
|
List<TakaiApplicationResult> list = takaiApplicationMapper.selectApplicationList(paramsVo);
|
|
|
@@ -1310,6 +1313,30 @@ public class TakaiAiServiceImpl implements ITakaiAiService {
|
|
|
return takaiApplicationMapper.selectRoleApp();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<TakaiApplicationResult> getChatAppList(List<TakaiApplicationResult> params, String userId) {
|
|
|
+ List<TakaiApplicationResult> list = new ArrayList();
|
|
|
+ for (TakaiApplicationResult app : params) {
|
|
|
+ AppCollect appCollect = appCollectMapper.selectAppCollectDetail(app.getAppId(), userId);
|
|
|
+ SysDictData dictData = null;
|
|
|
+ if(app.getTypeId() != null && !"".equals(app.getTypeId())){
|
|
|
+ dictData = sysDictDataMapper.selectDictDataById(Long.valueOf(app.getTypeId()));
|
|
|
+ }
|
|
|
+
|
|
|
+ TakaiApplicationResult appResult = new TakaiApplicationResult();
|
|
|
+ appResult.setAppId(app.getAppId());
|
|
|
+ appResult.setName(app.getName());
|
|
|
+ appResult.setDesc(app.getDesc());
|
|
|
+ appResult.setTypeId(app.getTypeId());
|
|
|
+ appResult.setCreateTime(app.getCreateTime());
|
|
|
+ appResult.setChatMode("'LOCAL'");
|
|
|
+ appResult.setIsCollect(appCollect != null ? true : false);
|
|
|
+ appResult.setTypeName(dictData != null ? dictData.getDictLabel() : "");
|
|
|
+ list.add(appResult);
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
private ApprovalNode getFirstApproverNode() {
|
|
|
List<DocumentAuditConfig> list = documentAuditConfigMapper.selectDocumentAuditConfigListByBo(null);
|
|
|
if(list != null && list.size() > 0) {
|