UAT问题清单-53条,市场认证清单增加表头排序。
This commit is contained in:
+7
@@ -142,4 +142,11 @@ public class AuthDummyInventoryInfoEO implements Serializable {
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "交付物模板", width = 20)
|
||||
private String deliverableTemplateName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String orderByField;
|
||||
|
||||
// 1顺序 2倒序
|
||||
@TableField(exist = false)
|
||||
private String orderBy;
|
||||
}
|
||||
|
||||
+33
-1
@@ -587,11 +587,43 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
|
||||
@Override
|
||||
public List<AuthDummyInventoryInfoEO> queryList(AuthDummyInventoryInfoEO authDummyInventoryInfoEO,HttpServletRequest req) {
|
||||
QueryWrapper<AuthDummyInventoryInfoEO> queryWrapper = QueryGenerator.initQueryWrapper(authDummyInventoryInfoEO, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
|
||||
String orderByField = authDummyInventoryInfoEO.getOrderByField();
|
||||
String orderBy = authDummyInventoryInfoEO.getOrderBy();
|
||||
// 如果排序字段不为空
|
||||
if(org.apache.commons.lang.StringUtils.isNotEmpty(orderByField)){
|
||||
// if (StringUtils.equals(orderBy,"2")) {
|
||||
// orderBy = " DESC";
|
||||
// }else {
|
||||
// orderBy = " ASC";
|
||||
// }
|
||||
// 转换字段
|
||||
orderByField = convertOrderByField(orderByField);
|
||||
queryWrapper.orderBy(true, "1".equals(orderBy)?true:false, orderByField);
|
||||
}else {
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
}
|
||||
|
||||
List<AuthDummyInventoryInfoEO> authDummyInventoryInfoEOList = this.list(queryWrapper);
|
||||
return authDummyInventoryInfoEOList;
|
||||
}
|
||||
|
||||
private String convertOrderByField(String orderByField) {
|
||||
if(StringUtils.isEmpty(orderByField)){
|
||||
return null;
|
||||
}
|
||||
switch (orderByField) {
|
||||
case "category" : return "category";
|
||||
case "inspectionItem" : return"inspection_item";
|
||||
case "configItem" : return"config_item";
|
||||
case "wvtaId" : return"wvta_id";
|
||||
case "serialNumber" : return "serial_number";
|
||||
case "dutyTerritory" : return "duty_territory";
|
||||
case "deliverableType" : return "deliverable_type";
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> copyInfoByIds(String ids, String cut) {
|
||||
String resultMsg = "";
|
||||
|
||||
Reference in New Issue
Block a user