feat: 国标外标支持根据标准号查询
This commit is contained in:
+13
-5
@@ -167,6 +167,12 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
@Resource
|
||||
private IProcessFbStandardConsultationService processFbStandardConsultationService;
|
||||
|
||||
@Resource
|
||||
private ILawsDomesticStandardService gbService;
|
||||
|
||||
@Resource
|
||||
private ILawsOverseasStandardService fbService;
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/8/23 16:57
|
||||
@@ -1172,11 +1178,13 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
if (StringUtils.isBlank(id) && StringUtils.isBlank(standardNumber)) {
|
||||
throw new JeroBootException(ResultCommon.EMPTY_COMMON, "id和标准号不能同时为空");
|
||||
}
|
||||
if (StrUtil.isBlank(id) && module.equals(TableNameEnum.ENTERPRISE_STANDARDS.getValue())) {
|
||||
// 根据标准号获取id
|
||||
LambdaQueryWrapper<LawsEnterpriseStandard> esWrapper = new LambdaQueryWrapper<>();
|
||||
esWrapper.eq(LawsEnterpriseStandard::getStandardNumber, standardNumber);
|
||||
id = esService.list(esWrapper).get(0).getId();
|
||||
ManyStandardSelectionBox singleStandard;
|
||||
if (StrUtil.isNotBlank(id)) {
|
||||
singleStandard = getSingleStandard(null, id);
|
||||
standardNumber = singleStandard.getStandardNumber();
|
||||
} else {
|
||||
singleStandard = getSingleStandard(standardNumber, null);
|
||||
id = singleStandard.getId();
|
||||
}
|
||||
// 获取要操作的表名
|
||||
String tableName = TableNameEnum.getTableName(module);
|
||||
|
||||
+4
-3
@@ -144,9 +144,10 @@ public class LawsDomesticController {
|
||||
@ApiOperationSupport(order = 7)
|
||||
@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, null);
|
||||
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type, null));
|
||||
@RequestParam(name="type") @ApiParam("类型(1详情,2新增编辑)") String type,
|
||||
@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));
|
||||
}
|
||||
|
||||
@AutoLog(value = "国内法规标准-根据ids删除信息")
|
||||
|
||||
+4
-3
@@ -135,9 +135,10 @@ public class LawsOverseasController {
|
||||
@ApiOperationSupport(order = 7)
|
||||
@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, null);
|
||||
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type, null));
|
||||
@RequestParam(name="type") @ApiParam("类型(1详情,2新增编辑)") String type,
|
||||
@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));
|
||||
}
|
||||
|
||||
@AutoLog(value = "海外法规标准-根据ids删除信息")
|
||||
|
||||
Reference in New Issue
Block a user