| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dg.core.db.gen.entity.*; |
| | | import com.dg.core.db.gen.mapper.AutomessageTransactionEventInterviewMapper; |
| | | import com.dg.core.db.gen.mapper.KeywordMapper; |
| | | import com.dg.core.db.gen.mapper.OrganizationChartMapper; |
| | | import com.dg.core.db.gen.mapper.TransactionEventMapper; |
| | | import com.dg.core.db.gen.mapper.*; |
| | | import com.dg.core.db.manual.pojo.QueryResults; |
| | | import com.dg.core.db.manual.pojo.RecommendResult; |
| | | import com.dg.core.db.manual.pojo.Search; |
| | | import com.dg.core.service.ITransactionEventService; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.InputStream; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | |
| | | |
| | | @Resource |
| | | private AutomessageTransactionEventInterviewMapper automessageTransactionEventInterviewMapper; |
| | | |
| | | |
| | | @Resource |
| | | private GuideRepairOrderMapper guideRepairOrderMapper; |
| | | |
| | | @Override |
| | | public TransactionEvent selectConfigData(String Id, SysUser sysUser) { |
| | |
| | | |
| | | @Override |
| | | public int deleteConfigById(String Id) { |
| | | return baseMapper.deleteConfigById(Id); |
| | | List<GuideRepairOrder> guideRepairOrders = guideRepairOrderMapper |
| | | .selectList(new QueryWrapper<GuideRepairOrder>().lambda().eq(GuideRepairOrder::getMatterId, Id)); |
| | | if (guideRepairOrders.size() == 0){ |
| | | return baseMapper.deleteConfigById(Id); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | |
| | | queryResults.setTransactionEventList(searchesAssociate); |
| | | queryResults.setKeywordEntityList(keywordMapper.selectByName(keyWord)); |
| | | queryResults.setTotal((baseMapper.selectSearch(keyWord).size()) + (baseMapper.selectSearchAssociate(keyWord).size())); |
| | | List<TransactionEvent> transactionEventEntities = baseMapper.queryMatterNameList(keyWord, null); |
| | | List<String> list = new ArrayList<>(); |
| | | for (TransactionEvent transactionEvent : transactionEventEntities) { |
| | | if (transactionEvent.getAssociateNames() != null) { |
| | | String[] associateNames = transactionEvent.getAssociateNames().split(","); |
| | | for (String associateName : associateNames) { |
| | | list.add(associateName); |
| | | } |
| | | } |
| | | } |
| | | List<KeywordEntity> keywordEntityList = new ArrayList<>(); |
| | | |
| | | String[] keywords = list.stream().distinct().collect(Collectors.joining(",")).split(",");//去重 |
| | | for (String keyword : keywords) { |
| | | if (keyword != null && !keyword.equals("")) { |
| | | KeywordEntity keywordEntity = new KeywordEntity(); |
| | | keywordEntity.setName(keyword); |
| | | keywordEntityList.add(keywordEntity); |
| | | } |
| | | } |
| | | queryResults.setKeywordAssociationList(keywordEntityList); |
| | | return queryResults; |
| | | } |
| | | |
| | |
| | | for (Search search : searches) { |
| | | search.setTransactionEventList(baseMapper.queryMatterNameList(keyWord, search.getClassifyId().toString())); |
| | | } |
| | | queryResults.setOrganizationChartEntityList(organizationChartMapper.selectByKeyWord(keyWord)); |
| | | queryResults.setSearchList(searches); |
| | | List<Search> searchesAssociate = baseMapper.selectSearchAssociateDistinct(keyWord); |
| | | for (Search search : searchesAssociate) { |
| | |
| | | RecommendResult recommendResult = new RecommendResult(); |
| | | List<KeywordEntity> keywordEntityList = new ArrayList<>(); |
| | | List<TransactionEvent> transactionEventEntities = baseMapper.queryMatterNameList(keyWord, null); |
| | | List<TransactionEvent> transactionEvents = baseMapper.queryAssociateNamesList(keyWord, null); |
| | | recommendResult.setTransactionEventList(transactionEventEntities); |
| | | List<String> list = new ArrayList<>(); |
| | | for (TransactionEvent transactionEvent : transactionEventEntities) { |
| | | if (transactionEvent.getAssociateNames() != null) { |
| | | for (TransactionEvent transactionEvent : transactionEvents) { |
| | | // 直接返回办事指南名称 |
| | | list.add(transactionEvent.getMatterName()); |
| | | // 遍历关键词列表 可能后面流程更改会遇到暂时保存代码; |
| | | /* if (transactionEvent.getAssociateNames() != null) { |
| | | String[] associateNames = transactionEvent.getAssociateNames().split(","); |
| | | for (String associateName : associateNames) { |
| | | list.add(associateName); |
| | | } |
| | | } |
| | | }*/ |
| | | } |
| | | String[] keywords = list.stream().distinct().collect(Collectors.joining(",")).split(",");//去重 |
| | | for (String keyword : keywords) { |
| | |
| | | @Override |
| | | public List<String> selectclassifyId(String classifyId) { |
| | | return baseMapper.selectclassifyId(classifyId); |
| | | } |
| | | |
| | | @Override |
| | | public List<TransactionEvent> selectClassifyList(List<String> ids) { |
| | | return baseMapper.selectClassifyList(ids); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<TransactionEvent> selectList() { |
| | | public List<TransactionEvent> selectList(String keyWord) { |
| | | if (keyWord!=null&&keyWord!=""){ |
| | | return baseMapper.selectList(new QueryWrapper<TransactionEvent>().lambda().like(TransactionEvent::getMatterName,keyWord)); |
| | | } |
| | | else { |
| | | return baseMapper.selectList(new QueryWrapper<TransactionEvent>().lambda()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |