update 获取法规表单、法规详情
This commit is contained in:
+2
-2
@@ -55,14 +55,14 @@ public interface ILawsCommonService {
|
|||||||
* @Date: 2023/8/24 10:53
|
* @Date: 2023/8/24 10:53
|
||||||
* @Description: 获取表单模型
|
* @Description: 获取表单模型
|
||||||
**/
|
**/
|
||||||
Map<String, Object> getFormModel(String module);
|
Map<String, Object> getFormModel(String module, Integer type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: liao
|
* @Author: liao
|
||||||
* @Date: 2023/8/24 11:49
|
* @Date: 2023/8/24 11:49
|
||||||
* @Description: 根据id和模块标识获取信息
|
* @Description: 根据id和模块标识获取信息
|
||||||
**/
|
**/
|
||||||
Map<String, Object> getByIdAndModule(String id, String module);
|
Map<String, Object> getByIdAndModule(String id, String module, Integer type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: liao
|
* @Author: liao
|
||||||
|
|||||||
+22
-7
@@ -440,7 +440,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
String id = (String) parameterMap.get(FieldCommon.ID);
|
String id = (String) parameterMap.get(FieldCommon.ID);
|
||||||
parameterMap.remove(FieldCommon.ID);
|
parameterMap.remove(FieldCommon.ID);
|
||||||
// 获取数据库里没修改的数据
|
// 获取数据库里没修改的数据
|
||||||
Map<String, Object> oldDataMap = getByIdAndModule(id, module);
|
Map<String, Object> oldDataMap = getByIdAndModule(id, module, 2);
|
||||||
|
|
||||||
// 组装更新内容
|
// 组装更新内容
|
||||||
StringBuilder recordBuffer = new StringBuilder();
|
StringBuilder recordBuffer = new StringBuilder();
|
||||||
@@ -570,7 +570,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
* @Description: 获取表单模型
|
* @Description: 获取表单模型
|
||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getFormModel(String module) {
|
public Map<String, Object> getFormModel(String module, Integer type) {
|
||||||
// 获取操作语言
|
// 获取操作语言
|
||||||
LanguageEnum language = MessageUtils.getLanguage();
|
LanguageEnum language = MessageUtils.getLanguage();
|
||||||
// 获取要操作的表名
|
// 获取要操作的表名
|
||||||
@@ -578,8 +578,16 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
// 获取全部字段
|
// 获取全部字段
|
||||||
List<LawsTag> fieldList = lawsCommonMapper.getFieldList(tableName);
|
List<LawsTag> fieldList = lawsCommonMapper.getFieldList(tableName);
|
||||||
// 筛选表单显示的字段
|
// 筛选表单显示的字段
|
||||||
fieldList = fieldList.stream().filter(lawsTag -> YesOrNoEnum.YES.getValue()
|
if (1 == type) {
|
||||||
.equals(lawsTag.getIsShowForm().toString())).collect(Collectors.toList());
|
// 详情显示
|
||||||
|
fieldList = fieldList.stream().filter(lawsTag -> YesOrNoEnum.YES.getValue()
|
||||||
|
.equals(lawsTag.getIsShowForm().toString())).collect(Collectors.toList());
|
||||||
|
} else {
|
||||||
|
// 新增编辑显示
|
||||||
|
fieldList = fieldList.stream().filter(lawsTag -> YesOrNoEnum.YES.getValue()
|
||||||
|
.equals(lawsTag.getIsShowFormCreate().toString())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
// 获取区域管理
|
// 获取区域管理
|
||||||
LawsArea lawsArea = new LawsArea();
|
LawsArea lawsArea = new LawsArea();
|
||||||
lawsArea.setIsModel(module);
|
lawsArea.setIsModel(module);
|
||||||
@@ -613,7 +621,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
* @Description: 根据id和模块标识获取信息
|
* @Description: 根据id和模块标识获取信息
|
||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getByIdAndModule(String id, String module) {
|
public Map<String, Object> getByIdAndModule(String id, String module, Integer type) {
|
||||||
if (StringUtils.isBlank(id)) {
|
if (StringUtils.isBlank(id)) {
|
||||||
throw new JeroBootException(ResultCommon.EMPTY_COMMON, "id");
|
throw new JeroBootException(ResultCommon.EMPTY_COMMON, "id");
|
||||||
}
|
}
|
||||||
@@ -622,8 +630,15 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
// 获取全部字段
|
// 获取全部字段
|
||||||
List<LawsTag> fieldList = lawsCommonMapper.getFieldList(tableName);
|
List<LawsTag> fieldList = lawsCommonMapper.getFieldList(tableName);
|
||||||
// 筛选表单显示的字段(传id查表单)
|
// 筛选表单显示的字段(传id查表单)
|
||||||
fieldList = fieldList.stream().filter(lawsTag -> YesOrNoEnum.YES.getValue()
|
if (1 == type) {
|
||||||
.equals(lawsTag.getIsShowForm().toString())).collect(Collectors.toList());
|
// 详情显示
|
||||||
|
fieldList = fieldList.stream().filter(lawsTag -> YesOrNoEnum.YES.getValue()
|
||||||
|
.equals(lawsTag.getIsShowForm().toString())).collect(Collectors.toList());
|
||||||
|
} else {
|
||||||
|
// 新增编辑显示
|
||||||
|
fieldList = fieldList.stream().filter(lawsTag -> YesOrNoEnum.YES.getValue()
|
||||||
|
.equals(lawsTag.getIsShowFormCreate().toString())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
// 封装查询显示的字段
|
// 封装查询显示的字段
|
||||||
String selectField = getSelectField(fieldList);
|
String selectField = getSelectField(fieldList);
|
||||||
|
|||||||
+5
-4
@@ -88,15 +88,16 @@ public class LawsDomesticController {
|
|||||||
@AutoLog(value = "国内法规标准-获取表单模型")
|
@AutoLog(value = "国内法规标准-获取表单模型")
|
||||||
@ApiOperation(value="国内法规标准-获取表单模型", notes="国内法规标准-获取表单模型")
|
@ApiOperation(value="国内法规标准-获取表单模型", notes="国内法规标准-获取表单模型")
|
||||||
@GetMapping(value = "getFormModel")
|
@GetMapping(value = "getFormModel")
|
||||||
public Result<Map<String,Object>> getFormModel() {
|
public Result<Map<String,Object>> getFormModel(@RequestParam(name="type") Integer type) {
|
||||||
return Result.OK(lawsCommonService.getFormModel(MODULE_VALUE));
|
return Result.OK(lawsCommonService.getFormModel(MODULE_VALUE, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
@AutoLog(value = "国内法规标准-根据id和模块标识获取信息")
|
@AutoLog(value = "国内法规标准-根据id和模块标识获取信息")
|
||||||
@ApiOperation(value="国内法规标准-根据id和模块标识获取信息", notes="国内法规标准-根据id和模块标识获取信息")
|
@ApiOperation(value="国内法规标准-根据id和模块标识获取信息", notes="国内法规标准-根据id和模块标识获取信息")
|
||||||
@GetMapping(value = "getByIdAndModule")
|
@GetMapping(value = "getByIdAndModule")
|
||||||
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id") String id) {
|
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id") String id,
|
||||||
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE));
|
@RequestParam(name="type") Integer type) {
|
||||||
|
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
@AutoLog(value = "国内法规标准-根据ids和模块标识删除信息")
|
@AutoLog(value = "国内法规标准-根据ids和模块标识删除信息")
|
||||||
|
|||||||
+5
-4
@@ -98,15 +98,16 @@ public class LawsEnterpriseController {
|
|||||||
@AutoLog(value = "企业法规标准-获取表单模型")
|
@AutoLog(value = "企业法规标准-获取表单模型")
|
||||||
@ApiOperation(value="企业法规标准-获取表单模型", notes="企业法规标准-获取表单模型")
|
@ApiOperation(value="企业法规标准-获取表单模型", notes="企业法规标准-获取表单模型")
|
||||||
@GetMapping(value = "getFormModel")
|
@GetMapping(value = "getFormModel")
|
||||||
public Result<Map<String,Object>> getFormModel() {
|
public Result<Map<String,Object>> getFormModel(@RequestParam(name="type") Integer type) {
|
||||||
return Result.OK(lawsCommonService.getFormModel(MODULE_VALUE));
|
return Result.OK(lawsCommonService.getFormModel(MODULE_VALUE, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
@AutoLog(value = "企业法规标准-根据id和模块标识获取信息")
|
@AutoLog(value = "企业法规标准-根据id和模块标识获取信息")
|
||||||
@ApiOperation(value="企业法规标准-根据id和模块标识获取信息", notes="企业法规标准-根据id和模块标识获取信息")
|
@ApiOperation(value="企业法规标准-根据id和模块标识获取信息", notes="企业法规标准-根据id和模块标识获取信息")
|
||||||
@GetMapping(value = "getByIdAndModule")
|
@GetMapping(value = "getByIdAndModule")
|
||||||
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id") String id) {
|
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id") String id,
|
||||||
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE));
|
@RequestParam(name="type") Integer type) {
|
||||||
|
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
@AutoLog(value = "企业法规标准-根据ids和模块标识删除信息")
|
@AutoLog(value = "企业法规标准-根据ids和模块标识删除信息")
|
||||||
|
|||||||
+5
-4
@@ -89,15 +89,16 @@ public class LawsOverseasController {
|
|||||||
@AutoLog(value = "海外法规标准-获取表单模型")
|
@AutoLog(value = "海外法规标准-获取表单模型")
|
||||||
@ApiOperation(value="海外法规标准-获取表单模型", notes="海外法规标准-获取表单模型")
|
@ApiOperation(value="海外法规标准-获取表单模型", notes="海外法规标准-获取表单模型")
|
||||||
@GetMapping(value = "getFormModel")
|
@GetMapping(value = "getFormModel")
|
||||||
public Result<Map<String,Object>> getFormModel() {
|
public Result<Map<String,Object>> getFormModel(@RequestParam(name="type") Integer type) {
|
||||||
return Result.OK(lawsCommonService.getFormModel(MODULE_VALUE));
|
return Result.OK(lawsCommonService.getFormModel(MODULE_VALUE, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
@AutoLog(value = "海外法规标准-根据id和模块标识获取信息")
|
@AutoLog(value = "海外法规标准-根据id和模块标识获取信息")
|
||||||
@ApiOperation(value="海外法规标准-根据id和模块标识获取信息", notes="海外法规标准-根据id和模块标识获取信息")
|
@ApiOperation(value="海外法规标准-根据id和模块标识获取信息", notes="海外法规标准-根据id和模块标识获取信息")
|
||||||
@GetMapping(value = "getByIdAndModule")
|
@GetMapping(value = "getByIdAndModule")
|
||||||
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id") String id) {
|
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id") String id,
|
||||||
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE));
|
@RequestParam(name="type") Integer type) {
|
||||||
|
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
@AutoLog(value = "海外法规标准-根据ids和模块标识删除信息")
|
@AutoLog(value = "海外法规标准-根据ids和模块标识删除信息")
|
||||||
|
|||||||
Reference in New Issue
Block a user