Commit 10004402 authored by tangwei's avatar tangwei

增加动态表单排序字段,排除反射获取类序列化标记字段

parent 971f6038
......@@ -45,5 +45,7 @@ public class AlertForm extends BaseEntity {
@ApiModelProperty(value = "是否一行显示")
private boolean isBlock;
//新加排序字段
@ApiModelProperty(value = "排序字段")
private int sortNum;
}
......@@ -122,9 +122,12 @@ public class AlertFormTypeController extends BaseController {
String fileValue = (String) field.get(alertFormType);
alertFormTypeQueryWrapper.eq(name, fileValue);
} else {
if(!name.equals(NameUtils.camel2Underline("serialVersionUID"))) {
String fileValue = (String) field.get(alertFormType);
alertFormTypeQueryWrapper.eq(name, fileValue);
}
}
}
} catch (Exception e) {
throw new RuntimeException("系统异常");
......
......@@ -45,7 +45,7 @@ import io.swagger.annotations.ApiOperation;
*/
@RestController
@Api(tags = "消防队伍Api")
@RequestMapping(value = "/jcs/fire-team")
@RequestMapping(value = "/fire-team")
public class FireTeamController extends BaseController {
@Autowired
......
......@@ -122,10 +122,12 @@ public class FirefightersContactsController extends BaseController {
String fileValue = (String) field.get(firefightersContacts);
firefightersContactsQueryWrapper.eq(name, fileValue);
} else {
if(!name.equals(NameUtils.camel2Underline("serialVersionUID"))) {
String fileValue = (String) field.get(firefightersContacts);
firefightersContactsQueryWrapper.eq(name, fileValue);
}
}
}
} catch (Exception e) {
throw new RuntimeException("系统异常");
}
......
......@@ -156,10 +156,12 @@ public class FirefightersContractController extends BaseController {
Date fileValue = (Date) field.get(firefightersContract);
firefightersContractQueryWrapper.eq(name, fileValue);
} else {
if(!name.equals(NameUtils.camel2Underline("serialVersionUID"))) {
String fileValue = (String) field.get(firefightersContract);
firefightersContractQueryWrapper.eq(name, fileValue);
}
}
}
} catch (Exception e) {
throw new RuntimeException("系统异常");
}
......
......@@ -236,9 +236,10 @@ public class FirefightersController extends BaseController {
String fileValue = (String) field.get(firefighters);
firefightersQueryWrapper.eq(name, fileValue);
} else {
if(!name.equals(NameUtils.camel2Underline("serialVersionUID"))) {
String fileValue = (String) field.get(firefighters);
firefightersQueryWrapper.eq(name, fileValue);
}
}}
}
} catch (Exception e) {
throw new RuntimeException("系统异常");
......
......@@ -146,10 +146,12 @@ public class FirefightersJacketController extends BaseController {
Date fileValue = (Date) field.get(firefightersJacket);
firefightersJacketQueryWrapper.eq(name, fileValue);
} else {
if(!name.equals(NameUtils.camel2Underline("serialVersionUID"))) {
String fileValue = (String) field.get(firefightersJacket);
firefightersJacketQueryWrapper.eq(name, fileValue);
}
}
}
} catch (Exception e) {
throw new RuntimeException("系统异常");
}
......
......@@ -188,9 +188,10 @@ public class FirefightersPostController extends BaseController {
String fileValue = (String) field.get(firefightersPost);
firefightersPostQueryWrapper.eq(name, fileValue);
} else {
if(!name.equals(NameUtils.camel2Underline("serialVersionUID"))) {
String fileValue = (String) field.get(firefightersPost);
firefightersPostQueryWrapper.eq(name, fileValue);
}
}}
}
} catch (Exception e) {
throw new RuntimeException("系统异常");
......
......@@ -160,9 +160,10 @@ public class FirefightersThoughtController extends BaseController {
Date fileValue = (Date) field.get(firefightersThought);
firefightersThoughtQueryWrapper.eq(name, fileValue);
} else {
if(!name.equals(NameUtils.camel2Underline("serialVersionUID"))) {
String fileValue = (String) field.get(firefightersThought);
firefightersThoughtQueryWrapper.eq(name, fileValue);
}
}}
}
} catch (Exception e) {
throw new RuntimeException("系统异常");
......
......@@ -36,6 +36,7 @@ public class AlertFormServiceImpl extends BaseService<AlertFromDto,AlertForm,Ale
QueryWrapper<AlertForm> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("alert_type_code", code);
queryWrapper.orderByAsc("sort_num");
List<AlertForm> alertFormValue = this.list(queryWrapper);
List<AlertFormVo> listfrom = new ArrayList<AlertFormVo>();
// 组装数据
......@@ -46,9 +47,10 @@ public class AlertFormServiceImpl extends BaseService<AlertFromDto,AlertForm,Ale
listfrom.add(vo);
}else {
// 查询数据项
Map<String, Object> columnMap = new HashMap<>();
columnMap.put("type", alertFrom.getFieldValueCode());
Collection<DataDictionary> listDataDictionary = iDataDictionaryService.listByMap(columnMap);
QueryWrapper<DataDictionary> queryWrappercolumnMap = new QueryWrapper<>();
queryWrappercolumnMap.eq("type", alertFrom.getFieldValueCode());
queryWrappercolumnMap.orderByAsc("sort_num");
Collection<DataDictionary> listDataDictionary = iDataDictionaryService.list(queryWrappercolumnMap);
AlertFormVo vo = new AlertFormVo(alertFrom.getFieldCode(), alertFrom.getFieldName(), alertFrom.getFieldType(),
new Items(getdata(listDataDictionary)), new AlertFormValue(alertFrom.getSequenceNbr(),alertFrom.getFieldName(), alertFrom.getFieldCode(),alertFrom.isBlock()));
listfrom.add(vo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment