style: 删除浏览记录相关代码
This commit is contained in:
-7
@@ -167,13 +167,6 @@ public interface ILawsCommonService {
|
|||||||
*/
|
*/
|
||||||
List<String> importExcelWithData(MultipartFile file, String module);
|
List<String> importExcelWithData(MultipartFile file, String module);
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: liao
|
|
||||||
* @Date: 2023/9/27 18:01
|
|
||||||
* @Description: 增加浏览记录
|
|
||||||
**/
|
|
||||||
void addLookHistory(String id, String type, String module, String standardNo);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取文件内容
|
* 获取文件内容
|
||||||
* @param file
|
* @param file
|
||||||
|
|||||||
+1
-30
@@ -1663,33 +1663,6 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: liao
|
|
||||||
* @Date: 2023/9/27 18:02
|
|
||||||
* @Description: 增加浏览记录
|
|
||||||
**/
|
|
||||||
@Override
|
|
||||||
public void addLookHistory(String id, String type, String module, String standardNo) {
|
|
||||||
if ("1".equals(type)) {
|
|
||||||
// 详情显示
|
|
||||||
LawsBrowsingHistory history = new LawsBrowsingHistory();
|
|
||||||
ManyStandardSelectionBox singleStandard = null;
|
|
||||||
if (StrUtil.isNotBlank(id)) {
|
|
||||||
singleStandard = getSingleStandard(null, id);
|
|
||||||
} else {
|
|
||||||
singleStandard = getSingleStandard(standardNo, null);
|
|
||||||
}
|
|
||||||
if (singleStandard == null) {
|
|
||||||
throw new JeroBootException(ResultCommon.NO_CORRESPONDING_DATA_FOUND);
|
|
||||||
}
|
|
||||||
history.setStandardId(id);
|
|
||||||
history.setStandardNumber(singleStandard.getStandardNumber());
|
|
||||||
history.setStandardName(singleStandard.getStandardName());
|
|
||||||
history.setStandardType(module);
|
|
||||||
lawsBrowsingHistoryService.add(history);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验导入数据有效性
|
* 校验导入数据有效性
|
||||||
*
|
*
|
||||||
@@ -1752,7 +1725,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
}
|
}
|
||||||
if (tableName.equals(TableNameEnum.DOMESTIC_REGULATIONS.getTableName())) {
|
if (tableName.equals(TableNameEnum.DOMESTIC_REGULATIONS.getTableName())) {
|
||||||
// 检查Excel的文件名
|
// 检查Excel的文件名
|
||||||
if (!excelName.equals("国内标准导入模板.xls")) {
|
if (!excelName.equals("外部标准导入模板.xls")) {
|
||||||
FileUnZip.deleteDir(saveDirectory);
|
FileUnZip.deleteDir(saveDirectory);
|
||||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
|
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
|
||||||
}
|
}
|
||||||
@@ -2666,7 +2639,6 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
LawsDomesticStandard gbStandard = lawsDomesticStandardService.getOne(new LambdaQueryWrapper<LawsDomesticStandard>()
|
LawsDomesticStandard gbStandard = lawsDomesticStandardService.getOne(new LambdaQueryWrapper<LawsDomesticStandard>()
|
||||||
.eq(LawsDomesticStandard::getStandardNumber, standardNumber));
|
.eq(LawsDomesticStandard::getStandardNumber, standardNumber));
|
||||||
if (gbStandard != null) {
|
if (gbStandard != null) {
|
||||||
this.addLookHistory(gbStandard.getId(), "1", TableNameEnum.DOMESTIC_REGULATIONS.getValue(), standardNumber);
|
|
||||||
result = this.getByIdAndModule(gbStandard.getId(), TableNameEnum.DOMESTIC_REGULATIONS.getValue(), "1", standardNumber);
|
result = this.getByIdAndModule(gbStandard.getId(), TableNameEnum.DOMESTIC_REGULATIONS.getValue(), "1", standardNumber);
|
||||||
result.put("source", TableNameEnum.DOMESTIC_REGULATIONS.getValue());
|
result.put("source", TableNameEnum.DOMESTIC_REGULATIONS.getValue());
|
||||||
return result;
|
return result;
|
||||||
@@ -2674,7 +2646,6 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
LawsEnterpriseStandard esStandard = lawsEnterpriseStandardService.getOne(new LambdaQueryWrapper<LawsEnterpriseStandard>()
|
LawsEnterpriseStandard esStandard = lawsEnterpriseStandardService.getOne(new LambdaQueryWrapper<LawsEnterpriseStandard>()
|
||||||
.eq(LawsEnterpriseStandard::getStandardNumber, standardNumber));
|
.eq(LawsEnterpriseStandard::getStandardNumber, standardNumber));
|
||||||
if (esStandard != null) {
|
if (esStandard != null) {
|
||||||
this.addLookHistory(esStandard.getId(), "1", TableNameEnum.ENTERPRISE_STANDARDS.getValue(), standardNumber);
|
|
||||||
result = this.getByIdAndModule(esStandard.getId(), TableNameEnum.ENTERPRISE_STANDARDS.getValue(), "1", standardNumber);
|
result = this.getByIdAndModule(esStandard.getId(), TableNameEnum.ENTERPRISE_STANDARDS.getValue(), "1", standardNumber);
|
||||||
result.put("source", TableNameEnum.ENTERPRISE_STANDARDS.getValue());
|
result.put("source", TableNameEnum.ENTERPRISE_STANDARDS.getValue());
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
+2
-3
@@ -135,7 +135,6 @@ public class LawsDomesticController {
|
|||||||
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id", required = false) @ApiParam("主键") String id,
|
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id", required = false) @ApiParam("主键") String id,
|
||||||
@RequestParam(name="type") @ApiParam("类型(1详情,2新增编辑)") String type,
|
@RequestParam(name="type") @ApiParam("类型(1详情,2新增编辑)") String type,
|
||||||
@RequestParam(name="standardNumber", required = false) @ApiParam("标准编号") String standardNumber) {
|
@RequestParam(name="standardNumber", required = false) @ApiParam("标准编号") String standardNumber) {
|
||||||
lawsCommonService.addLookHistory(id, type, MODULE_VALUE, standardNumber);
|
|
||||||
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type, standardNumber));
|
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type, standardNumber));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,7 +183,7 @@ public class LawsDomesticController {
|
|||||||
@RequiresPermissions("domesticStandard:export")
|
@RequiresPermissions("domesticStandard:export")
|
||||||
public void exportData(HttpServletResponse response, @RequestBody(required = false) @ApiParam("标签管理") Map<String,Object> parameterMap) {
|
public void exportData(HttpServletResponse response, @RequestBody(required = false) @ApiParam("标签管理") Map<String,Object> parameterMap) {
|
||||||
parameterMap.put(FieldCommon.MODULE, MODULE_VALUE);
|
parameterMap.put(FieldCommon.MODULE, MODULE_VALUE);
|
||||||
lawsCommonService.commonExport(response, parameterMap, "国内标准", "国内标准");
|
lawsCommonService.commonExport(response, parameterMap, "外部标准", "外部标准");
|
||||||
}
|
}
|
||||||
|
|
||||||
@AutoLog(value = "国内法规标准-带文件导出")
|
@AutoLog(value = "国内法规标准-带文件导出")
|
||||||
@@ -194,7 +193,7 @@ public class LawsDomesticController {
|
|||||||
@RequiresPermissions("domesticStandard:exportFile")
|
@RequiresPermissions("domesticStandard:exportFile")
|
||||||
public void exportDataWithFile(HttpServletResponse response, @RequestBody(required = false) @ApiParam("标签管理") Map<String,Object> parameterMap) {
|
public void exportDataWithFile(HttpServletResponse response, @RequestBody(required = false) @ApiParam("标签管理") Map<String,Object> parameterMap) {
|
||||||
parameterMap.put(FieldCommon.MODULE, MODULE_VALUE);
|
parameterMap.put(FieldCommon.MODULE, MODULE_VALUE);
|
||||||
lawsCommonService.exportDataWithFile(response, parameterMap, "国内标准", "国内标准");
|
lawsCommonService.exportDataWithFile(response, parameterMap, "外部标准", "外部标准");
|
||||||
}
|
}
|
||||||
|
|
||||||
@AutoLog(value = "国内法规标准-模板下载")
|
@AutoLog(value = "国内法规标准-模板下载")
|
||||||
|
|||||||
-2
@@ -156,8 +156,6 @@ public class LawsEnterpriseController {
|
|||||||
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id", required = false) @ApiParam("主键") String id,
|
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id", required = false) @ApiParam("主键") String id,
|
||||||
@RequestParam(name="type") @ApiParam("类型(1详情,2新增编辑)") String type,
|
@RequestParam(name="type") @ApiParam("类型(1详情,2新增编辑)") String type,
|
||||||
@RequestParam(name="standardNumber", required = false) @ApiParam("标准编号") String standardNumber) {
|
@RequestParam(name="standardNumber", required = false) @ApiParam("标准编号") String standardNumber) {
|
||||||
|
|
||||||
lawsCommonService.addLookHistory(id, type, MODULE_VALUE, standardNumber);
|
|
||||||
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type, standardNumber));
|
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type, standardNumber));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ public enum TableNameEnum {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
DOMESTIC_REGULATIONS("国内标准","laws_domestic_standard","1"),
|
DOMESTIC_REGULATIONS("外部标准","laws_domestic_standard","1"),
|
||||||
ENTERPRISE_STANDARDS("企业标准","laws_enterprise_standard","3"),
|
ENTERPRISE_STANDARDS("企业标准","laws_enterprise_standard","3"),
|
||||||
DOCUMENT_SPLIT("条款拆分","laws_document_split","4"),
|
DOCUMENT_SPLIT("条款拆分","laws_document_split","4"),
|
||||||
HOME_SEARCH("高级搜索(全部)","home_search","5")
|
HOME_SEARCH("高级搜索(全部)","home_search","5")
|
||||||
|
|||||||
Reference in New Issue
Block a user