fix: 修复企标编号跳转详情页报错问题
This commit is contained in:
+1
-1
@@ -172,7 +172,7 @@ public interface ILawsCommonService {
|
||||
* @Date: 2023/9/27 18:01
|
||||
* @Description: 增加浏览记录
|
||||
**/
|
||||
void addLookHistory(String id, String type, String module);
|
||||
void addLookHistory(String id, String type, String module, String standardNo);
|
||||
|
||||
/**
|
||||
* 获取文件内容
|
||||
|
||||
+7
-2
@@ -1478,11 +1478,16 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
* @Description: 增加浏览记录
|
||||
**/
|
||||
@Override
|
||||
public void addLookHistory(String id, String type, String module) {
|
||||
public void addLookHistory(String id, String type, String module, String standardNo) {
|
||||
if ("1".equals(type)) {
|
||||
// 详情显示
|
||||
LawsBrowsingHistory history = new LawsBrowsingHistory();
|
||||
ManyStandardSelectionBox singleStandard = getSingleStandard(null, id);
|
||||
ManyStandardSelectionBox singleStandard = null;
|
||||
if (StrUtil.isNotBlank(id)) {
|
||||
singleStandard = getSingleStandard(null, id);
|
||||
} else {
|
||||
singleStandard = getSingleStandard(standardNo, null);
|
||||
}
|
||||
history.setStandardId(id);
|
||||
history.setStandardNumber(singleStandard.getStandardNumber());
|
||||
history.setStandardName(singleStandard.getStandardName());
|
||||
|
||||
+1
-1
@@ -131,7 +131,7 @@ public class LawsDomesticController {
|
||||
@RequiresPermissions("domesticStandard:search")
|
||||
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id") @ApiParam("主键") String id,
|
||||
@RequestParam(name="type") @ApiParam("类型(1详情,2新增编辑)") String type) {
|
||||
lawsCommonService.addLookHistory(id, type, MODULE_VALUE);
|
||||
lawsCommonService.addLookHistory(id, type, MODULE_VALUE, null);
|
||||
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type, null));
|
||||
}
|
||||
|
||||
|
||||
+32
-1
@@ -12,6 +12,7 @@ import com.jero.modules.laws.common.constant.FieldCommon;
|
||||
import com.jero.common.api.vo.ResultCommon;
|
||||
import com.jero.modules.laws.common.service.ILawsCommonService;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardRmrEvaluateDetail;
|
||||
import com.jero.modules.laws.enterprise.entity.dto.ESQueryCommonDTO;
|
||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardAuthDeptService;
|
||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardAuthUserService;
|
||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardReviewMeetingRecordService;
|
||||
@@ -152,7 +153,8 @@ public class LawsEnterpriseController {
|
||||
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id", required = false) @ApiParam("主键") String id,
|
||||
@RequestParam(name="type") @ApiParam("类型(1详情,2新增编辑)") String type,
|
||||
@RequestParam(name="standardNumber", required = false) @ApiParam("标准编号") String standardNumber) {
|
||||
lawsCommonService.addLookHistory(id, type, MODULE_VALUE);
|
||||
|
||||
lawsCommonService.addLookHistory(id, type, MODULE_VALUE, standardNumber);
|
||||
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type, standardNumber));
|
||||
}
|
||||
|
||||
@@ -324,4 +326,33 @@ public class LawsEnterpriseController {
|
||||
@RequestParam(name="standardNumber", required = false) @ApiParam("标准编号") String standardNumber) {
|
||||
return Result.OK(esAuthUserService.detailPermissionByUser(id, standardNumber, UserUtils.getUserId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业法规标准-临时授权记录
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "企业法规标准-临时授权记录")
|
||||
@ApiOperation(value = "企业法规标准-临时授权记录", notes = "企业法规标准-临时授权记录")
|
||||
@GetMapping(value = "/tempAuthRecord")
|
||||
@ApiOperationSupport(order = 21)
|
||||
public Result<?> tempAuthRecord(TempAuthRecordQueryDto tempAuthRecordQueryDto,
|
||||
@RequestParam(name="pageNo", defaultValue="1") @ApiParam("页码") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") @ApiParam("页面显示数量") Integer pageSize) {
|
||||
return Result.OK(esAuthUserService.tempAuthRecord(tempAuthRecordQueryDto, pageNo, pageSize));
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业法规标准-解除授权
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "企业法规标准-解除授权")
|
||||
@ApiOperation(value = "企业法规标准-解除授权", notes = "企业法规标准-解除授权")
|
||||
@GetMapping(value = "/revokeAuth")
|
||||
@ApiOperationSupport(order = 22)
|
||||
public Result<?> revokeAuth(@RequestParam(name="id", required = false) @ApiParam("Id") String authId) {
|
||||
esAuthUserService.revokeAuth(authId);
|
||||
return Result.OK();
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -131,7 +131,7 @@ public class LawsOverseasController {
|
||||
@RequiresPermissions("overseasStandard:search")
|
||||
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id") @ApiParam("主键") String id,
|
||||
@RequestParam(name="type") @ApiParam("类型(1详情,2新增编辑)") String type) {
|
||||
lawsCommonService.addLookHistory(id, type, MODULE_VALUE);
|
||||
lawsCommonService.addLookHistory(id, type, MODULE_VALUE, null);
|
||||
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type, null));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user