fix(文档对比): 评论
This commit is contained in:
+26
-2
@@ -7,7 +7,10 @@ import com.jero.modules.compare.entity.SarFileCompareResComVO;
|
||||
import com.jero.modules.compare.entity.SarFileCompareResComment;
|
||||
import com.jero.modules.compare.mapper.SarFileCompareResCommentMapper;
|
||||
import com.jero.modules.compare.service.ISarFileCompareResCommentService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.util.MyStringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -23,6 +26,8 @@ import java.util.*;
|
||||
public class SarFileCompareResCommentServiceImpl extends ServiceImpl<SarFileCompareResCommentMapper, SarFileCompareResComment> implements ISarFileCompareResCommentService {
|
||||
|
||||
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -111,15 +116,26 @@ public class SarFileCompareResCommentServiceImpl extends ServiceImpl<SarFileComp
|
||||
resList.add(resComVO);
|
||||
}
|
||||
}
|
||||
// 填充属性
|
||||
for (SarFileCompareResComVO sarFileCompareResComVO : resList) {
|
||||
SysUser user = sysUserService.getUserByName(sarFileCompareResComVO.getName());
|
||||
if (!Objects.isNull(user)){
|
||||
sarFileCompareResComVO.setName(user.calcNameWorkNo());
|
||||
}
|
||||
}
|
||||
return resList;
|
||||
}
|
||||
|
||||
private SarFileCompareResComVO wrapperSarFileCompareResComVO(SarFileCompareResComment rc) {
|
||||
SarFileCompareResComVO resComVO = new SarFileCompareResComVO();
|
||||
resComVO.setId(rc.getId());
|
||||
resComVO.setName(rc.getCreateBy());
|
||||
resComVO.setCreateTime(sdf.format(rc.getCreateTime()));
|
||||
resComVO.setContent(rc.getComment());
|
||||
// 填充属性
|
||||
SysUser user = sysUserService.getUserByName(rc.getCreateBy());
|
||||
if (!Objects.isNull(user)){
|
||||
resComVO.setName(user.calcNameWorkNo());
|
||||
}
|
||||
return resComVO;
|
||||
}
|
||||
|
||||
@@ -154,6 +170,14 @@ public class SarFileCompareResCommentServiceImpl extends ServiceImpl<SarFileComp
|
||||
resCommentMap.put(prcVo.getId(), prcVo);
|
||||
}
|
||||
}
|
||||
return Lists.newArrayList(resCommentMap.values());
|
||||
ArrayList<SarFileCompareResComVO> sarFileCompareResComVOS = Lists.newArrayList(resCommentMap.values());
|
||||
// 填充属性
|
||||
for (SarFileCompareResComVO sarFileCompareResComVO : sarFileCompareResComVOS) {
|
||||
SysUser user = sysUserService.getUserByName(sarFileCompareResComVO.getName());
|
||||
if (!Objects.isNull(user)){
|
||||
sarFileCompareResComVO.setName(user.calcNameWorkNo());
|
||||
}
|
||||
}
|
||||
return sarFileCompareResComVOS;
|
||||
}
|
||||
}
|
||||
|
||||
-1
@@ -93,7 +93,6 @@ public class DocumentSplitCommon {
|
||||
*/
|
||||
public static final String SPLIT_STATUS2 = "2";
|
||||
public static final String INTERPRETATION = "interpretation";
|
||||
|
||||
public static final String MEG_DEL = "删除成功!";
|
||||
public static final String MEG_DEL_BATCH = "批量删除成功!";
|
||||
}
|
||||
+6
-6
@@ -308,11 +308,11 @@ public class DocumentSplitController {
|
||||
* 文档拆分详情-导出
|
||||
* @param request
|
||||
* @param response
|
||||
* @AutoLog(value = "文档拆分详情-导出")
|
||||
* @ApiOperation(value = "文档拆分详情-导出")
|
||||
* @GetMapping("/exportDocumentSplitDetail")
|
||||
* public void exportDocumentSplitDetail(@RequestBody Map<String, Object> parameter, HttpServletRequest request, HttpServletResponse response) {
|
||||
* documentSplitService.exportDocumentSplitDetail(parameter, request, response);
|
||||
* }
|
||||
*/
|
||||
@AutoLog(value = "文档拆分详情-导出")
|
||||
@ApiOperation(value = "文档拆分详情-导出")
|
||||
@GetMapping("/exportDocumentSplitDetail")
|
||||
public void exportDocumentSplitDetail(@RequestBody Map<String, Object> parameter, HttpServletRequest request, HttpServletResponse response) {
|
||||
documentSplitService.exportDocumentSplitDetail(parameter, request, response);
|
||||
}
|
||||
}
|
||||
|
||||
+8
-8
@@ -126,7 +126,6 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
return documentSplitMapper.queryByPage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<DocumentSplitInfo> queryByList(DocumentSplitInfo documentSplitInfo) {
|
||||
// 构建查询条件
|
||||
@@ -362,7 +361,8 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
if (DocumentSplitCommon.TEXT.equals(sarFileSplitItemsValEO.getType())) {
|
||||
valContent.append("<p>").append(sarFileSplitItemsValEO.getItemContent()).append("</p>");
|
||||
} else if (DocumentSplitCommon.IMG.equals(sarFileSplitItemsValEO.getType())) {
|
||||
valContent.append("<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\"").append(sarFileSplitItemsValEO.getItemContent()).append("\">");
|
||||
valContent.append("<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\"")
|
||||
.append(sarFileSplitItemsValEO.getItemContent()).append("\">");
|
||||
} else if (DocumentSplitCommon.TABLE.equals(sarFileSplitItemsValEO.getType())) {
|
||||
valContent.append(sarFileSplitItemsValEO.getItemContent());
|
||||
}
|
||||
@@ -622,7 +622,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
// 填充说明
|
||||
Cell cell = headerRowTwo.createCell(0);
|
||||
String explain = "模版说明:\n" +
|
||||
"1. 条款号/条款标题/条文内容不能为空\n" +
|
||||
"1. 条文号/条文标题/条文内容不能为空\n" +
|
||||
"2. 仅支持zip格式文件夹";
|
||||
|
||||
CellStyle cellStyleTwo = workbook.createCellStyle();
|
||||
@@ -791,8 +791,8 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
// 文档拆分详情(旧)
|
||||
List<Map<String, Object>> oldLawsDocumentSplitList = documentSplitMapper.queryLawsDocumentSplitByInfoId(id);
|
||||
/**
|
||||
* List<String> oldLawsDocumentSplitIdList = new ArrayList<>();
|
||||
* List<String> newLawsDocumentSplitIdList = new ArrayList<>();
|
||||
* List<String> oldLawsDocumentSplitIdList = new ArrayList<>();
|
||||
* List<String> newLawsDocumentSplitIdList = new ArrayList<>();
|
||||
*/
|
||||
for (Map<String, Object> map : oldLawsDocumentSplitList) {
|
||||
String oldId = (String) map.get(ID);
|
||||
@@ -802,7 +802,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
String newId = UUID.randomUUID().toString().replace("-", "");
|
||||
map.put(ID, newId);
|
||||
/**
|
||||
* newLawsDocumentSplitIdList.add(newId);
|
||||
* newLawsDocumentSplitIdList.add(newId);
|
||||
*/
|
||||
map.put(INFO_ID, newInfo.getId());
|
||||
|
||||
@@ -853,7 +853,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
// 创建工作簿
|
||||
|
||||
// 创建sheet页
|
||||
Sheet sheet = workbook.createSheet("条款内容");
|
||||
Sheet sheet = workbook.createSheet("条文内容");
|
||||
// 字段名
|
||||
List<String> keyList = new ArrayList<>();
|
||||
if(!Objects.isNull(mapList) && !mapList.isEmpty()){
|
||||
@@ -1066,7 +1066,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
}else {
|
||||
queryWrapper.isNull("publish_before_id");
|
||||
}
|
||||
// 逻辑删除
|
||||
// 逻辑删除
|
||||
queryWrapper.eq("del_flag", 0);
|
||||
// 排序
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
|
||||
+1
-1
@@ -221,7 +221,7 @@ public class FileSplitItemsEOController extends JeroController<SarFileSplitItems
|
||||
|
||||
@ApiOperation(value = "文档拆分条款信息-导入拆分结果")
|
||||
@PostMapping(value = "/importSplitResult")
|
||||
@RequiresPermissions("split:sarFileSplitItems:importSplitResult")
|
||||
@RequiresPermissions("split:sarFileSplitInfo:splitResult")
|
||||
public Result<?> importSplitResult(String splitFileId,
|
||||
String cut,
|
||||
SarFileSplitInfoEO splitInfoEO) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user