Commit f9e1923f authored by 王鹿鹿's avatar 王鹿鹿

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

parents 0dbaea7a 62f1546e
...@@ -16,7 +16,6 @@ import org.aspectj.lang.annotation.Before; ...@@ -16,7 +16,6 @@ import org.aspectj.lang.annotation.Before;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.annotation.Order; import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
......
...@@ -252,6 +252,7 @@ SELECT ...@@ -252,6 +252,7 @@ SELECT
( (
cf.state_code IN ('94', '98') cf.state_code IN ('94', '98')
OR cf.state_code IS NULL OR cf.state_code IS NULL
or LENGTH(cf.state_code) = 0
) )
AND cf.is_delete = FALSE AND cf.is_delete = FALSE
<if test="jobCode != null"> <if test="jobCode != null">
......
...@@ -234,11 +234,11 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ ...@@ -234,11 +234,11 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
} }
// syncDataService.syncCreatedSendAlarmReport(ent); // syncDataService.syncCreatedSendAlarmReport(ent);
} }
//数字换流站使用
mqttSendGateway.sendToMqtt(TopicEnum.EQZXDT.getTopic(), "");
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() { TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
@Override @Override
public void afterCommit() { public void afterCommit() {
//数字换流站使用
mqttSendGateway.sendToMqtt(TopicEnum.EQZXDT.getTopic(), "");
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("seqNo", UUID.randomUUID().toString().replace("-", "").toLowerCase()); jsonObject.put("seqNo", UUID.randomUUID().toString().replace("-", "").toLowerCase());
mqttSendGateway.sendToMqtt(TopicEnum.ALARM_LOG_INSERT.getTopic(), jsonObject.toString()); mqttSendGateway.sendToMqtt(TopicEnum.ALARM_LOG_INSERT.getTopic(), jsonObject.toString());
......
...@@ -1141,6 +1141,11 @@ public class ExcelServiceImpl { ...@@ -1141,6 +1141,11 @@ public class ExcelServiceImpl {
List<FireTeam> excelEntityList = new ArrayList<>(); List<FireTeam> excelEntityList = new ArrayList<>();
excelDtoList.forEach(item -> { excelDtoList.forEach(item -> {
if (StringUtils.isEmpty(item.getCompanyCode()) || StringUtils.isEmpty(item.getName()) ||
StringUtils.isEmpty(item.getTypeCode()) || StringUtils.isEmpty(item.getAddress()) ||
StringUtils.isEmpty(item.getLatitude()) || StringUtils.isEmpty(item.getLongitude())) {
throw new BadRequest("请检查必填项是否为空");
}
FireTeam fireTeam = new FireTeam(); FireTeam fireTeam = new FireTeam();
fireTeam = Bean.toPo(item, fireTeam); fireTeam = Bean.toPo(item, fireTeam);
fireTeam = Bean.toPo(getCurrentInfo(), fireTeam); fireTeam = Bean.toPo(getCurrentInfo(), fireTeam);
......
...@@ -2,6 +2,7 @@ package com.yeejoin.amos.knowledgebase.face.orm.dao; ...@@ -2,6 +2,7 @@ package com.yeejoin.amos.knowledgebase.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.knowledgebase.face.orm.entity.KnowledgeTag; import com.yeejoin.amos.knowledgebase.face.orm.entity.KnowledgeTag;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
...@@ -17,4 +18,11 @@ public interface TagMapper extends BaseMapper<KnowledgeTag> { ...@@ -17,4 +18,11 @@ public interface TagMapper extends BaseMapper<KnowledgeTag> {
List<KnowledgeTag> queryTagByNameInPublishedDoc(String tagName); List<KnowledgeTag> queryTagByNameInPublishedDoc(String tagName);
/**
* 统计标签被引用数量
* @param sequenceNbr
* @param quoteType
* @return
*/
Integer queryCountByTagSeq(@Param("sequenceNbr") Long sequenceNbr, @Param("quoteType") String quoteType);
} }
\ No newline at end of file
...@@ -57,7 +57,13 @@ public class TagService extends BaseService<KnowledgeTagModel, KnowledgeTag, Tag ...@@ -57,7 +57,13 @@ public class TagService extends BaseService<KnowledgeTagModel, KnowledgeTag, Tag
private DocContentService docContentService; private DocContentService docContentService;
@Autowired @Autowired
private ConfigLoader configLoader; private ConfigLoader configLoader;
@Autowired
private TagMapper tagMapper;
/**
* 统计方式-文档是否发布
*/
public static final String QUOTE_TYPE_PUBLISHED = "PUBLISHED";
/** /**
* 创建标签 * 创建标签
...@@ -169,7 +175,10 @@ public class TagService extends BaseService<KnowledgeTagModel, KnowledgeTag, Tag ...@@ -169,7 +175,10 @@ public class TagService extends BaseService<KnowledgeTagModel, KnowledgeTag, Tag
for (KnowledgeTag tag : tagList) { for (KnowledgeTag tag : tagList) {
KnowledgeTagModel tagModel = Bean.toModel(tag, new KnowledgeTagModel()); KnowledgeTagModel tagModel = Bean.toModel(tag, new KnowledgeTagModel());
//加入引用数量 //加入引用数量
tagModel.setReferenceNumber(getAllReference(tagModel.getSequenceNbr())); // tagModel.setReferenceNumber(getAllReference(tagModel.getSequenceNbr()));
//被引用且已发布数量
Integer num = tagMapper.queryCountByTagSeq(tagModel.getSequenceNbr(), QUOTE_TYPE_PUBLISHED);
tagModel.setReferenceNumber(num);
//获取拼音首字母 //获取拼音首字母
String pinyin; String pinyin;
try { try {
......
...@@ -18,4 +18,15 @@ ...@@ -18,4 +18,15 @@
WHERE DOC_STATUS = "PUBLISHED")) WHERE DOC_STATUS = "PUBLISHED"))
AND TAG_NAME LIKE CONCAT('%', #{tagName},'%') AND TAG_NAME LIKE CONCAT('%', #{tagName},'%')
</select> </select>
<select id="queryCountByTagSeq" resultType="java.lang.Integer">
SELECT
count( ti.SEQUENCE_NBR )
FROM
knowledge_tag_instance ti
LEFT JOIN knowledge_doc_content dc ON dc.SEQUENCE_NBR = ti.TARGET_SEQ
WHERE
ti.TAG_SEQ = #{sequenceNbr}
AND dc.DOC_STATUS = #{quoteType}
</select>
</mapper> </mapper>
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