update 获取法规表单、法规详情

This commit is contained in:
liao
2023-09-19 14:54:07 +08:00
parent 83f7870c28
commit 95cabb2fdb
5 changed files with 13 additions and 13 deletions
@@ -55,14 +55,14 @@ public interface ILawsCommonService {
* @Date: 2023/8/24 10:53
* @Description: 获取表单模型
**/
Map<String, Object> getFormModel(String module, Integer type);
Map<String, Object> getFormModel(String module, String type);
/**
* @Author: liao
* @Date: 2023/8/24 11:49
* @Description: 根据id和模块标识获取信息
**/
Map<String, Object> getByIdAndModule(String id, String module, Integer type);
Map<String, Object> getByIdAndModule(String id, String module, String type);
/**
* @Author: liao
@@ -440,7 +440,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
String id = (String) parameterMap.get(FieldCommon.ID);
parameterMap.remove(FieldCommon.ID);
// 获取数据库里没修改的数据
Map<String, Object> oldDataMap = getByIdAndModule(id, module, 2);
Map<String, Object> oldDataMap = getByIdAndModule(id, module, "2");
// 组装更新内容
StringBuilder recordBuffer = new StringBuilder();
@@ -570,7 +570,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
* @Description: 获取表单模型
**/
@Override
public Map<String, Object> getFormModel(String module, Integer type) {
public Map<String, Object> getFormModel(String module, String type) {
// 获取操作语言
LanguageEnum language = MessageUtils.getLanguage();
// 获取要操作的表名
@@ -578,7 +578,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
// 获取全部字段
List<LawsTag> fieldList = lawsCommonMapper.getFieldList(tableName);
// 筛选表单显示的字段
if (1 == type) {
if ("1".equals(type)) {
// 详情显示
fieldList = fieldList.stream().filter(lawsTag -> YesOrNoEnum.YES.getValue()
.equals(lawsTag.getIsShowForm().toString())).collect(Collectors.toList());
@@ -621,7 +621,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
* @Description: 根据id和模块标识获取信息
**/
@Override
public Map<String, Object> getByIdAndModule(String id, String module, Integer type) {
public Map<String, Object> getByIdAndModule(String id, String module, String type) {
if (StringUtils.isBlank(id)) {
throw new JeroBootException(ResultCommon.EMPTY_COMMON, "id");
}
@@ -630,7 +630,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
// 获取全部字段
List<LawsTag> fieldList = lawsCommonMapper.getFieldList(tableName);
// 筛选表单显示的字段(传id查表单)
if (1 == type) {
if ("1".equals(type)) {
// 详情显示
fieldList = fieldList.stream().filter(lawsTag -> YesOrNoEnum.YES.getValue()
.equals(lawsTag.getIsShowForm().toString())).collect(Collectors.toList());
@@ -88,7 +88,7 @@ public class LawsDomesticController {
@AutoLog(value = "国内法规标准-获取表单模型")
@ApiOperation(value="国内法规标准-获取表单模型", notes="国内法规标准-获取表单模型")
@GetMapping(value = "getFormModel")
public Result<Map<String,Object>> getFormModel(@RequestParam(name="type") Integer type) {
public Result<Map<String,Object>> getFormModel(@RequestParam(name="type") String type) {
return Result.OK(lawsCommonService.getFormModel(MODULE_VALUE, type));
}
@@ -96,7 +96,7 @@ public class LawsDomesticController {
@ApiOperation(value="国内法规标准-根据id和模块标识获取信息", notes="国内法规标准-根据id和模块标识获取信息")
@GetMapping(value = "getByIdAndModule")
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id") String id,
@RequestParam(name="type") Integer type) {
@RequestParam(name="type") String type) {
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type));
}
@@ -98,7 +98,7 @@ public class LawsEnterpriseController {
@AutoLog(value = "企业法规标准-获取表单模型")
@ApiOperation(value="企业法规标准-获取表单模型", notes="企业法规标准-获取表单模型")
@GetMapping(value = "getFormModel")
public Result<Map<String,Object>> getFormModel(@RequestParam(name="type") Integer type) {
public Result<Map<String,Object>> getFormModel(@RequestParam(name="type") String type) {
return Result.OK(lawsCommonService.getFormModel(MODULE_VALUE, type));
}
@@ -106,7 +106,7 @@ public class LawsEnterpriseController {
@ApiOperation(value="企业法规标准-根据id和模块标识获取信息", notes="企业法规标准-根据id和模块标识获取信息")
@GetMapping(value = "getByIdAndModule")
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id") String id,
@RequestParam(name="type") Integer type) {
@RequestParam(name="type") String type) {
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type));
}
@@ -89,7 +89,7 @@ public class LawsOverseasController {
@AutoLog(value = "海外法规标准-获取表单模型")
@ApiOperation(value="海外法规标准-获取表单模型", notes="海外法规标准-获取表单模型")
@GetMapping(value = "getFormModel")
public Result<Map<String,Object>> getFormModel(@RequestParam(name="type") Integer type) {
public Result<Map<String,Object>> getFormModel(@RequestParam(name="type") String type) {
return Result.OK(lawsCommonService.getFormModel(MODULE_VALUE, type));
}
@@ -97,7 +97,7 @@ public class LawsOverseasController {
@ApiOperation(value="海外法规标准-根据id和模块标识获取信息", notes="海外法规标准-根据id和模块标识获取信息")
@GetMapping(value = "getByIdAndModule")
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id") String id,
@RequestParam(name="type") Integer type) {
@RequestParam(name="type") String type) {
return Result.OK(lawsCommonService.getByIdAndModule(id, MODULE_VALUE, type));
}