feat: 条款导入标准
This commit is contained in:
+5
@@ -60,5 +60,10 @@ public class ProcessStandardInterpretClause extends BaseEntity {
|
|||||||
/**是否分发(1:是 0:否)*/
|
/**是否分发(1:是 0:否)*/
|
||||||
@ApiModelProperty(value = "是否分发(1:是 0:否)")
|
@ApiModelProperty(value = "是否分发(1:是 0:否)")
|
||||||
private String isDistribute;
|
private String isDistribute;
|
||||||
|
|
||||||
|
// 标准id
|
||||||
|
@ApiModelProperty("标准id")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String standardId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+16
-9
@@ -303,10 +303,12 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
lawsDocumentSplit.setStandardId(lawsDomesticStandard.getId());
|
lawsDocumentSplit.setStandardId(lawsDomesticStandard.getId());
|
||||||
lawsDocumentSplit.setFileType(
|
lawsDocumentSplit.setFileType(
|
||||||
standardInterpretDTO.getProcessStandardInterpret().getDecompositionSource());
|
standardInterpretDTO.getProcessStandardInterpret().getDecompositionSource());
|
||||||
|
lawsDocumentSplit.setInfoId(processStandardInterpret.getSplitInfoId());
|
||||||
HashMap<String, Object> parameter = new HashMap<>();
|
HashMap<String, Object> parameter = new HashMap<>();
|
||||||
parameter.put("standard_id", lawsDomesticStandard.getId());
|
parameter.put("standard_id", lawsDomesticStandard.getId());
|
||||||
parameter.put("file_type",
|
// parameter.put("file_type",
|
||||||
standardInterpretDTO.getProcessStandardInterpret().getDecompositionSource());
|
// standardInterpretDTO.getProcessStandardInterpret().getDecompositionSource());
|
||||||
|
parameter.put("info_id", processStandardInterpret.getSplitInfoId());
|
||||||
List<Map<String, Object>> maps = documentSplitService.queryDocumentSplitDetailByList(parameter);
|
List<Map<String, Object>> maps = documentSplitService.queryDocumentSplitDetailByList(parameter);
|
||||||
if (CollectionUtils.isNotEmpty(maps)){
|
if (CollectionUtils.isNotEmpty(maps)){
|
||||||
lawsDocumentSplit.setId(String.valueOf(maps.get(0).get("id")));
|
lawsDocumentSplit.setId(String.valueOf(maps.get(0).get("id")));
|
||||||
@@ -785,12 +787,18 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
list = documentSplitMapper.selectClauseList(lawsDocumentSplit);
|
list = documentSplitMapper.selectClauseList(lawsDocumentSplit);
|
||||||
|
|
||||||
// 添加标准数据
|
// 添加标准数据
|
||||||
LawsDomesticStandard lawsDomesticStandard = lawsDomesticStandardService.getById(standardId);
|
if (CollectionUtils.isNotEmpty(list)){
|
||||||
ProcessStandardInterpretClause processStandardInterpretClause = new ProcessStandardInterpretClause();
|
if (StringUtils.isNotBlank(list.get(0).getStandardId())) {
|
||||||
processStandardInterpretClause.setClauseId(lawsDomesticStandard.getId());
|
standardId = sarFileSplitInfoEO.getStandardId();
|
||||||
processStandardInterpretClause.setItemNum(lawsDomesticStandard.getStandardNumber());
|
list.remove(0);
|
||||||
processStandardInterpretClause.setItemTitle(lawsDomesticStandard.getStandardName());
|
}
|
||||||
list.add(0, processStandardInterpretClause);
|
LawsDomesticStandard lawsDomesticStandard = lawsDomesticStandardService.getById(standardId);
|
||||||
|
ProcessStandardInterpretClause processStandardInterpretClause = new ProcessStandardInterpretClause();
|
||||||
|
processStandardInterpretClause.setClauseId(lawsDomesticStandard.getId());
|
||||||
|
processStandardInterpretClause.setItemNum(lawsDomesticStandard.getStandardNumber());
|
||||||
|
processStandardInterpretClause.setItemTitle(lawsDomesticStandard.getStandardName());
|
||||||
|
list.add(0, processStandardInterpretClause);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -1669,7 +1677,6 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
processStandardInterpretClause.setClauseId(processStandardInterpret.getStandardId());
|
processStandardInterpretClause.setClauseId(processStandardInterpret.getStandardId());
|
||||||
processStandardInterpretClause.setItemNum(processStandardInterpret.getStandardNumber());
|
processStandardInterpretClause.setItemNum(processStandardInterpret.getStandardNumber());
|
||||||
processStandardInterpretClause.setItemTitle(processStandardInterpret.getStandardName());
|
processStandardInterpretClause.setItemTitle(processStandardInterpret.getStandardName());
|
||||||
processStandardInterpretClause.setItemTitle(processStandardInterpret.getStandardName());
|
|
||||||
processStandardInterpretClauseList.add(processStandardInterpretClause);
|
processStandardInterpretClauseList.add(processStandardInterpretClause);
|
||||||
}else if (CollectionUtils.isEmpty(processStandardInterpretClauseList)){
|
}else if (CollectionUtils.isEmpty(processStandardInterpretClauseList)){
|
||||||
// 如果没选择条款
|
// 如果没选择条款
|
||||||
|
|||||||
+5
-3
@@ -50,11 +50,12 @@
|
|||||||
|
|
||||||
<insert id="insertBatchLawsDocumentSplit">
|
<insert id="insertBatchLawsDocumentSplit">
|
||||||
INSERT INTO laws_document_split (id, create_by, create_time, update_by, update_time, sys_org_code,
|
INSERT INTO laws_document_split (id, create_by, create_time, update_by, update_time, sys_org_code,
|
||||||
is_same_as_prev_version, item_title, menu_id, item_content, translation, item_num, info_id)
|
is_same_as_prev_version, item_title, menu_id, item_content, translation, item_num, info_id, standard_id)
|
||||||
values
|
values
|
||||||
<foreach collection="entity" item="item" index="index" separator=",">
|
<foreach collection="entity" item="item" index="index" separator=",">
|
||||||
(#{item.id}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.sysOrgCode},
|
(#{item.id}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.sysOrgCode},
|
||||||
#{item.isSameAsPrevVersion}, #{item.itemTitle}, #{item.menuId}, #{item.itemContent}, #{item.translation}, #{item.itemNum}, #{item.infoId})
|
#{item.isSameAsPrevVersion}, #{item.itemTitle}, #{item.menuId}, #{item.itemContent}, #{item.translation},
|
||||||
|
#{item.itemNum}, #{item.infoId}, #{item.standardId})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -272,13 +273,14 @@
|
|||||||
|
|
||||||
<select id="selectClauseList"
|
<select id="selectClauseList"
|
||||||
resultType="com.jero.modules.activiti.process.standardinterpret.entity.ProcessStandardInterpretClause">
|
resultType="com.jero.modules.activiti.process.standardinterpret.entity.ProcessStandardInterpretClause">
|
||||||
SELECT s.id clauseId,item_num,item_title,item_content
|
SELECT s.id clauseId,item_num,item_title,item_content,standard_id
|
||||||
FROM laws_document_split s
|
FROM laws_document_split s
|
||||||
LEFT JOIN SAR_FILE_SPLIT_MENU m ON s.MENU_ID = m.id
|
LEFT JOIN SAR_FILE_SPLIT_MENU m ON s.MENU_ID = m.id
|
||||||
WHERE del_flag = 0
|
WHERE del_flag = 0
|
||||||
<if test="lawsDocumentSplit.infoId != null and lawsDocumentSplit.infoId != ''">
|
<if test="lawsDocumentSplit.infoId != null and lawsDocumentSplit.infoId != ''">
|
||||||
AND s.info_id = #{lawsDocumentSplit.infoId}
|
AND s.info_id = #{lawsDocumentSplit.infoId}
|
||||||
</if>
|
</if>
|
||||||
|
ORDER BY display_seq ASC, sort_number IS NULL, sort_number ASC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectClauseListScc"
|
<select id="selectClauseListScc"
|
||||||
|
|||||||
+3
@@ -1758,6 +1758,9 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
// 等值匹配
|
// 等值匹配
|
||||||
selectCondition.append(" and standard_id = '").append(parameter.get("standard_id")).append("'");
|
selectCondition.append(" and standard_id = '").append(parameter.get("standard_id")).append("'");
|
||||||
parameter.remove("standard_id");
|
parameter.remove("standard_id");
|
||||||
|
}else {
|
||||||
|
// 默认不查询标准信息
|
||||||
|
selectCondition.append(" and standard_id is null");
|
||||||
}
|
}
|
||||||
if (parameter.containsKey("file_type")){
|
if (parameter.containsKey("file_type")){
|
||||||
// 等值匹配
|
// 等值匹配
|
||||||
|
|||||||
+17
-1
@@ -31,7 +31,9 @@ import com.jero.modules.laws.documenttool.mapper.DocumentSplitMapper;
|
|||||||
import com.jero.modules.laws.documenttool.service.IDocumentSplitService;
|
import com.jero.modules.laws.documenttool.service.IDocumentSplitService;
|
||||||
import com.jero.modules.laws.labeldatabase.entity.LawsLabelDatabase;
|
import com.jero.modules.laws.labeldatabase.entity.LawsLabelDatabase;
|
||||||
import com.jero.modules.laws.labeldatabase.service.ILawsLabelDatabaseService;
|
import com.jero.modules.laws.labeldatabase.service.ILawsLabelDatabaseService;
|
||||||
|
import com.jero.modules.laws.standard.entity.LawsDomesticStandard;
|
||||||
import com.jero.modules.laws.standard.entity.PartName;
|
import com.jero.modules.laws.standard.entity.PartName;
|
||||||
|
import com.jero.modules.laws.standard.service.ILawsDomesticStandardService;
|
||||||
import com.jero.modules.laws.standard.service.ILawsPartNameService;
|
import com.jero.modules.laws.standard.service.ILawsPartNameService;
|
||||||
import com.jero.modules.oss.entity.OSSFile;
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
import com.jero.modules.oss.service.IOSSFileService;
|
import com.jero.modules.oss.service.IOSSFileService;
|
||||||
@@ -161,6 +163,8 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
private DocumentSplitMapper documentSplitMapper;
|
private DocumentSplitMapper documentSplitMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private AsynService asynService;
|
private AsynService asynService;
|
||||||
|
@Autowired
|
||||||
|
private ILawsDomesticStandardService lawsDomesticStandardService;
|
||||||
|
|
||||||
@Value(value = "${jero.path.upload}")
|
@Value(value = "${jero.path.upload}")
|
||||||
private String uploadpath;
|
private String uploadpath;
|
||||||
@@ -2003,7 +2007,16 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
}
|
}
|
||||||
long l = System.currentTimeMillis();
|
long l = System.currentTimeMillis();
|
||||||
log.error("================插入条款详情耗时:" + (l - aa) + "ms");
|
log.error("================插入条款详情耗时:" + (l - aa) + "ms");
|
||||||
|
boolean existStandard = false;
|
||||||
if (CollectionUtils.isNotEmpty(LawsDocumentSplit)){
|
if (CollectionUtils.isNotEmpty(LawsDocumentSplit)){
|
||||||
|
// 判断第一条是否是标准
|
||||||
|
LawsDomesticStandard lawsDomesticStandard =
|
||||||
|
lawsDomesticStandardService.queryByStandardNumber(LawsDocumentSplit.get(0).getItemNum());
|
||||||
|
if (!Objects.isNull(lawsDomesticStandard)){
|
||||||
|
existStandard = true;
|
||||||
|
LawsDocumentSplit.get(0).setStandardId(lawsDomesticStandard.getId());
|
||||||
|
LawsDocumentSplit.get(0).setFileType(sarFileSplitInfoEO.getFileType());
|
||||||
|
}
|
||||||
batchSaveItems(LawsDocumentSplit);
|
batchSaveItems(LawsDocumentSplit);
|
||||||
}
|
}
|
||||||
long bb = System.currentTimeMillis();
|
long bb = System.currentTimeMillis();
|
||||||
@@ -2048,6 +2061,9 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
// sarFileSplitMenuEO.setModifyTime(new Date());
|
// sarFileSplitMenuEO.setModifyTime(new Date());
|
||||||
// sarFileSplitMenuEOMapper.insertSelective(sarFileSplitMenuEO);
|
// sarFileSplitMenuEOMapper.insertSelective(sarFileSplitMenuEO);
|
||||||
|
|
||||||
|
if (existStandard && treeNode.getItemId().equals(LawsDocumentSplit.get(0).getId())){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
SarFileSplitMenu sarFileSplitMenu = new SarFileSplitMenu();
|
SarFileSplitMenu sarFileSplitMenu = new SarFileSplitMenu();
|
||||||
sarFileSplitMenu.setId(treeNode.getId());
|
sarFileSplitMenu.setId(treeNode.getId());
|
||||||
sarFileSplitMenu.setInfoId(infoId);
|
sarFileSplitMenu.setInfoId(infoId);
|
||||||
@@ -2067,7 +2083,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
long f = System.currentTimeMillis();
|
long f = System.currentTimeMillis();
|
||||||
log.error("================插入菜单耗时:" + (f - e) + "ms");
|
log.error("================插入目录耗时:" + (f - e) + "ms");
|
||||||
String msg = "";
|
String msg = "";
|
||||||
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())){
|
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())){
|
||||||
msg = "成功导入" + countSuccess + "条";
|
msg = "成功导入" + countSuccess + "条";
|
||||||
|
|||||||
Reference in New Issue
Block a user