feat(标准解读流程): 流程结束添加标准解读

This commit is contained in:
yjz
2024-07-12 16:16:30 +08:00
parent 7b2c0dcdcf
commit b108f7e97f
4 changed files with 55 additions and 1 deletions
@@ -42,6 +42,7 @@ import com.jero.modules.activiti.service.ProcessNodeLinkService;
import com.jero.modules.laws.documenttool.entity.LawsDocumentSplit;
import com.jero.modules.laws.documenttool.mapper.DocumentSplitMapper;
import com.jero.modules.laws.documenttool.mapper.LawsDocumentSplitMapper;
import com.jero.modules.laws.documenttool.service.IDocumentSplitService;
import com.jero.modules.laws.standard.entity.LawsDomesticStandard;
import com.jero.modules.laws.standard.entity.LawsEnterpriseStandard;
import com.jero.modules.laws.standard.entity.PartName;
@@ -119,6 +120,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
private final ILawsEnterpriseStandardService lawsEnterpriseStandardService;
private final LawsDocumentSplitMapper lawsDocumentSplitMapper;
private final SarFileSplitItemsValEOMapper sarFileSplitItemsValEOMapper;
private final IDocumentSplitService documentSplitService;
private final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
private final List<String> tempList = new ArrayList<>();
@@ -235,8 +237,25 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
for (ProcessStandardInterpretClauseSublist standardInterpretClauseSublist :
processStandardInterpretClauseSublistList) {
LawsDocumentSplit lawsDocumentSplit = new LawsDocumentSplit();
LawsDomesticStandard lawsDomesticStandard =
lawsDomesticStandardService.getById(standardInterpretClauseSublist.getClauseId());
if (!Objects.isNull(lawsDomesticStandard)){
// 标准
lawsDocumentSplit.setStandardId(standardInterpretDTO.getProcessStandardInterpret().getStandardId());
lawsDocumentSplit.setFileType(
standardInterpretDTO.getProcessStandardInterpret().getDecompositionSource());
HashMap<String, Object> parameter = new HashMap<>();
parameter.put("standard_id", lawsDomesticStandard.getId());
parameter.put("standard_type",
standardInterpretDTO.getProcessStandardInterpret().getDecompositionSource());
List<Map<String, Object>> maps = documentSplitService.queryDocumentSplitDetailByList(parameter);
if (!Objects.isNull(maps)){
lawsDocumentSplit.setId(String.valueOf(maps.get(0).get("id")));
}
}else {
lawsDocumentSplit.setId(standardInterpretClauseSublist.getClauseId());
}
BeanUtils.copyProperties(standardInterpretClauseSublist, lawsDocumentSplit);
lawsDocumentSplit.setId(standardInterpretClauseSublist.getClauseId());
lawsDocumentSplit.setItemNum(null);
lawsDocumentSplit.setItemTitle(null);
lawsDocumentSplit.setItemContent(null);
@@ -260,6 +260,25 @@ public class DocumentSplitController {
}
}
/**
* 标准拆分详情-列表查询
* @param parameter
* @return
*/
@AutoLog(value = "标准拆分详情-列表查询")
@ApiOperation(value = "标准拆分详情-列表查询")
@PostMapping("/queryDocumentSplitDetailList")
public Result<List<Map<String,Object>>> queryDocumentSplitDetailList(@RequestBody @ApiParam("标签管理") Map<String, Object> parameter) {
try {
List<Map<String, Object>> data = documentSplitService.queryDocumentSplitDetailByList(parameter);
return Result.OK(data);
} catch (JeroBootException e){
return Result.error(e.getMessage());
} catch (Exception e){
return Result.error(MessageUtils.getMessage(ResultCommon.ERROR));
}
}
/**
* 标准拆分详情-根据id查询
* @param id
@@ -123,6 +123,12 @@ public class LawsDocumentSplit extends BaseEntity {
// 备注
@ApiModelProperty("备注")
private String remarkss;
// 标准id
@ApiModelProperty("标准id")
private String standardId;
// 文件类型
@ApiModelProperty("文件类型")
private String fileType;
// 拆分信息记录id
@ApiModelProperty("拆分信息记录id")
private String infoId;
@@ -1637,6 +1637,16 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
selectCondition.append(likeCondition(ITEM_CONTENT, (String) parameter.get(ITEM_CONTENT)));
parameter.remove(ITEM_CONTENT);
}
if (parameter.containsKey("standard_id")){
// 等值匹配
selectCondition.append(" and standard_id = '").append(parameter.get("standard_id")).append("'");
parameter.remove("standard_id");
}
if (parameter.containsKey("file_type")){
// 等值匹配
selectCondition.append(" and file_type = '").append(parameter.get("file_type")).append("'");
parameter.remove("file_type");
}
// 树节点搜索
if (parameter.containsKey(MENU_ID)){
// 查询此节点下的所有子节点